PHP 4.3.2
MySQL 3.23.54
db 'pratt' has all permissions except grant and
references.
CREATE TABLE installed_templates (
id int(11) NOT NULL auto_increment,
name varchar(50) NOT NULL default '',
value varchar(50) NOT NULL default '',
PRIMARY KEY (id)
) TYPE=MyISAM;
the script while excuting this query:
INSERT INTO `installed_templates` VALUES (2,
'Blue', '1');
gives a syntax error.
assigning a value to a field with autoincrement may be a
bug its not the cause of the error.
after the error the table is still empty, running the query
manually inserts the record as expected without error.
-----------------------------------
output from the query-log:
2041 Init DB pratt
2041 Query CREATE TABLE `files` (
`id` int(11) NOT NUL
L auto_increment, `filename` varchar(50) NOT NULL
default '', `description` te
xt NOT NULL, PRIMARY KEY (`id`), KEY `filename`
(`filename`)) TYPE=MyISAM AUT
O_INCREMENT=7
2041 Init DB pratt
2041 Query CREATE TABLE `images`
( `id` int(11) NOT NU
LL auto_increment, `filename` varchar(50) NOT NULL
default '', `description` t
ext NOT NULL, PRIMARY KEY (`id`)) TYPE=MyISAM
AUTO_INCREMENT=5
2041 Init DB pratt
2041 Query CREATE TABLE
`installed_templates` ( `id` i
nt(11) NOT NULL auto_increment, `name` varchar(50)
NOT NULL default '', `value
` varchar(50) NOT NULL default '', PRIMARY KEY
(`id`)) TYPE=MyISAM AUTO_INCREM
ENT=4
2041 Init DB pratt
2041 Query INSERT INTO
`installed_templates` VALUES (2,
'Blue', '1');
output from the install script:
Error: the query number 27 died!
db_error Object
(
[error_message_prefix] =>
[mode] => 1
[level] => 1024
[code] => -2
[message] => DB Error: syntax error
[userinfo] => INSERT INTO `installed_templates`
VALUES (2, 'Blue', '1');
[nativecode=1064 ** Fehler in der Syntax bei ';
' in Zeile 1.]
[backtrace] => Array
(
[0] => Array
(
[file]
=> /apache/opt2/r/pratt/admin/install/DB.php
[line] => 604
[function] => pear_error
[class] => db_error
[type] => ->
[args] => Array
(
[0] => DB Error: syntax error
[1] => -2
[2] => 1
[3] => 1024
[4] => INSERT INTO
`installed_templates` VALUES (2, 'Blue', '1');
[nativecode=1064 ** Fehler in der Syntax bei ';
' in Zeile 1.]
)
)
[1] => Array
(
[file]
=> /apache/opt2/r/pratt/admin/install/PEAR.php
[line] => 508
[function] => db_error
[class] => db_error
[type] => ->
[args] => Array
(
[0] => -2
[1] => 1
[2] => 1024
[3] => INSERT INTO
`installed_templates` VALUES (2, 'Blue', '1');
[nativecode=1064 ** Fehler in der Syntax bei ';
' in Zeile 1.]
)
)
[2] => Array
(
[file]
=> /apache/opt2/r/pratt/admin/install/DB/common.php
[line] => 298
[function] => raiseerror
[class] => pear
[type] => ::
[args] => Array
(
[0] =>
[1] => -2
[2] =>
[3] =>
[4] => INSERT INTO
`installed_templates` VALUES (2, 'Blue', '1');
[nativecode=1064 ** Fehler in der Syntax bei ';
' in Zeile 1.]
[5] => DB_Error
[6] => 1
)
)
[3] => Array
(
[file]
=> /apache/opt2/r/pratt/admin/install/DB/mysql.php
[line] => 713
[function] => raiseerror
[class] => db_mysql
[type] => ->
[args] => Array
(
[0] => -2
[1] =>
[2] =>
[3] =>
[4] => 1064 ** Fehler in der
Syntax bei ';
' in Zeile 1.
)
)
[4] => Array
(
[file]
=> /apache/opt2/r/pratt/admin/install/DB/mysql.php
[line] => 223
[function] => mysqlraiseerror
[class] => db_mysql
[type] => ->
[args] => Array
(
)
)
[5] => Array
(
[file]
=> /apache/opt2/r/pratt/admin/install/DB/common.php
[line] => 735
[function] => simplequery
[class] => db_mysql
[type] => ->
[args] => Array
(
[0] => INSERT INTO
`installed_templates` VALUES (2, 'Blue', '1');
)
)
[6] => Array
(
[file]
=> /apache/opt2/r/pratt/admin/install/pages/step4.php
[line] => 41
[function] => query
[class] => db_mysql
[type] => ->
[args] => Array
(
[0] => INSERT INTO
`installed_templates` VALUES (2, 'Blue', '1');
)
)
[7] => Array
(
[file]
=> /apache/opt2/r/pratt/admin/install/index.php
[line] => 65
[args] => Array
(
[0]
=> /apache/opt2/r/pratt/admin/install/pages/step4.php
)
[function] => require
)
)
[callback] =>
)
Logged In: YES
user_id=417235
i got the same error...
just open admin/install/sql/mysql-prattcms.sql and remove
all ';' at the end of the queryies! then it will work..
i don't know if this is just with out mysql-version?! or is
it a bug?
Logged In: YES
user_id=848685
I think it is a bug...
Logged In: NO
Edit a sql file mysql.prattcms.sql in your ../admin/install/sql
folder and remove ; (semicolon) symbol at the end of each
line with insert instruction.
example is:
INSERT INTO `installed_templates` VALUES (2, 'Blue', '1');
shoud be:
INSERT INTO `installed_templates` VALUES (2, 'Blue', '1')
There are more lines to check.