Member
Member
spellmank   2006-05-14, 21:14
#1

Hi,

I go this error during setup.

Creating tables...
MySQL Query ( ALTER TABLE wp_comments ADD CONSTRAINT comments_ibfk_1 FOREIGN KEY (imageid) REFERENCES wp_images (id) ON DELETE CASCADE ON UPDATE CASCADE; ) Failed. Error: Key column 'imageid' doesn't exist in table

Any ideas on how to resolve this error?

Thank you,
spellmank

Developer
Developer
trisweb   2006-05-14, 23:21
#2

hm... is your table prefix "wp_"? Is it conflicting with a Wordpress installation?

Yeah, I don't recommend using "wp" as a prefix. Try "zp" instead ;-)

Member
Member
spellmank   2006-05-15, 02:05
#3

Thank you!!!

I changed the prefix to "zp_" and that did the trick.

spellmank

Member
Member
DarrellD   2006-06-05, 03:34
#4

I got this same error after setting up yet another local test gallery. I install them all on the same database, I just use different table prefixes.

So for example, I have one instance of zenphoto installed at [b]/one[/b] then my table names would be [b]one_albums[/b], [b]one_images[/b], [b]one_comments[/b].

Before I got this error I only had 2 installations, one with zenphoto 1.0.2 another with zenphoto 1.0.3. Now that I'm installing a second version of 1.0.3 I get this error. According to THIS there's a conflict with the contraints.

May I suggest in the next version that the constraint names are also prefixed with the table prefix?

I've modified the setup.php to do this and I'm now able to install the second instance of 1.0.3.

Developer
Developer
trisweb   2006-06-05, 07:27
#5

Yep, sounds like a problem. Can someone file a bug report? I'm going to sleep

Developer
Developer
trisweb   2006-06-05, 07:28
#6

Also everyone should know that it should still work without the constraints, as long as the tables got created.

Member
Member
DarrellD   2006-06-05, 07:58
#7

Reported.

Thanks, Tristan.

Member
Member
Chilifrei64   2006-06-05, 15:24
#8

Yeah. i kinda thought it was an error on my part.. I have all my galleries at beta.chilifrei.net on the same database with a different prefix and i get the error on setup.. but all my galleries do still work without a problem.

Member
Member
Zulan   2007-03-13, 15:39
#9

How do I change the table prefix?

Developer
Developer
trisweb   2007-03-13, 19:26
#10

Zulan, edit the file zp-config.php in the /zen directory, and change the string

$conf['mysql_prefix'] = "";

to

$conf['mysql_prefix'] = "your_prefix_here_";

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.