adding a module results in Database Error

KennethL

Joined: 2009-12-27
Posts: 4
Posted: Sun, 2009-12-27 13:16

This is with a new install, downloaded from github yesterday (gallery3-32d25da).

The gallery3 install went fine but as soon as I add any module I get a database error like this (this one from g2 import module):

Database_Exception [ Database Error ]: #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 '{g2_maps} ( `id` int(9) NOT NULL auto_increment, ' at line 1 [ CREATE TABLE IF NOT EXISTS {g2_maps} ( `id` int(9) NOT NULL auto_increment, `g2_id` int(9) NOT NULL, `g3_id` int(9) NOT NULL, PRIMARY KEY (`id`), KEY (`g2_id`)) DEFAULT CHARSET=utf8; ]

Any idea on what I missed?

apache 2.2.14
php 5.2.11
mysql 5.0.84

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2009-12-27 18:10
Quote:
as I add any module

Was it a G2 module?

Quote:
'{g2_maps}

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
KennethL

Joined: 2009-12-27
Posts: 4
Posted: Sun, 2009-12-27 18:22

It was the Gallery2 import module included in Gallery3 (the 5th selection from the top after selecting Admin>modules from the Browse Album page). But it doesn't seem to be related to this specific module, if I select the exif data module I get the following database error:

Database_Exception [ Database Error ]: #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 '{exif_records} ( `id` int(9) NOT NULL auto_increment, ' at line 1 [ CREATE TABLE IF NOT EXISTS {exif_records} ( `id` int(9) NOT NULL auto_increment, `item_id` INTEGER(9) NOT NULL, `key_count` INTEGER(9) default 0, `data` TEXT, `dirty` BOOLEAN default 1, PRIMARY KEY (`id`), KEY(`item_id`)) DEFAULT CHARSET=utf8; ]

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2009-12-27 18:36

Did you use a table prefix when installing G3?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
KennethL

Joined: 2009-12-27
Posts: 4
Posted: Sun, 2009-12-27 18:41

No I didn't use table prefix, the only thing I added to the setup page was the MySQL root password.

 
amessina
amessina's picture

Joined: 2005-07-16
Posts: 3
Posted: Sun, 2009-12-27 19:14

I am having the saem problem in Fedora 12 using the following:

mysql-5.1.41-2.fc12.x86_64
mysql-libs-5.1.41-2.fc12.x86_64
mysql-server-5.1.41-2.fc12.x86_6
php-mysql-5.3.1-1.fc12.x86_64

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2009-12-27 20:45

Bug! Thanks -- I hadn't tested the code without a table prefix. I've just pushed a fix for it -- if you pull down the latest code you should be able to continue. Thanks for the rapid report!
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git

 
KennethL

Joined: 2009-12-27
Posts: 4
Posted: Sun, 2009-12-27 21:01

Thanks for the quick fix, works great now!