Page 1 of 1

MySQL error 1064 on new installation v 2.7.9

Posted: 16 Jun 2011, 11:21
by Nicodemus
Brand new installation of PG v 2.7.9 and I get the following MySQL error after installation. On first look I wonder if my download of the component installation got corrupted :? 1064 is one of those slightly annoying non-specific MySQL error codes regarding syntax.
Phoca Gallery not successfully installed:
DB function failed with error number 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'int(11) NOT NULL Default '0', `videocode` text, `vmproductid` int(11) NOT NULL' at line 15 SQL=CREATE TABLE `jos_phocagallery`( `id` int(11) unsigned NOT NULL auto_increment, `catid` int(11) NOT NULL default '0', `sid` int(11) NOT NULL default '0', `title` varchar(250) NOT NULL default '', `alias` varchar(255) NOT NULL default '', `filename` varchar(250) NOT NULL default '', `description` text, `date` datetime NOT NULL default '0000-00-00 00:00:00', `hits` int(11) NOT NULL default '0', `latitude` varchar(20) NOT NULL default '', `longitude` varchar(20) NOT NULL default '', `zoom` int(3) NOT NULL default '0', `geotitle` varchar(255) NOT NULL default '', `userid` varchar(255) int(11) NOT NULL Default '0', `videocode` text, `vmproductid` int(11) NOT NULL default '0', `imgorigsize` int(11) NOT NULL default '0', `published` tinyint(1) NOT NULL default '0', `approved` tinyint(1) NOT NULL default '0', `checked_out` int(11) NOT NULL default '0', `checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00', `ordering` int(11) NOT NULL default '0', `params` text, `metakey` text, `metadesc` text, `extlink1` text, `extlink2` text, `extid` varchar(255) NOT NULL default '', `extl` varchar(255) NOT NULL default '', `extm` varchar(255) NOT NULL default '', `exts` varchar(255) NOT NULL default '', `exto` varchar(255) NOT NULL default '', `extw` varchar(255) NOT NULL default '', `exth` varchar(255) NOT NULL default '', PRIMARY KEY (`id`), KEY `catid` (`catid`,`published`) ) ENGINE=MyISAM CHARACTER SET `utf8`;
And it looks like the problem is here:
`userid` varchar(255) int(11) NOT NULL Default '0', `videocode` text,
My question is has anyone else had a problem with 2.7.9 fresh install?

I'm going to go and check the tables and recreate with the sql queries manually as necessary now :wink:

Re: MySQL error 1064 on new installation v 2.7.9

Posted: 16 Jun 2011, 12:24
by Nicodemus
Created table using the appropriate sql from install.bak and all works now.

Checking through the packaged zip file for com_phocagallery_v2.7.9.zip it looks like line 47 of phocagalleryinstall.php in the \controllers folder may be the problem. This looks like where the sql for the install or update is built.
$query.=' '.$db->nameQuote('userid').' varchar(255) int(11) NOT NULL Default \'0\','."\n";
I'm going to try another download and see if the package content is the same. Could just be my first d/l got corrupted. :)

Re: MySQL error 1064 on new installation v 2.7.9

Posted: 16 Jun 2011, 12:40
by Jan
Hi, there was a syntax error in 2.7.9, download and install the 2.8.0
https://www.phoca.cz/download/category/1 ... -component
Should be fixed there.

Jan

[FIXED] MySQL error 1064 on new installation v 2.7.9

Posted: 16 Jun 2011, 16:42
by Nicodemus
Thanks Jan :) That's fixed it.

Nick