Error during setup

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

Comments

  • trisweb Administrator
    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 ;-)
  • Thank you!!!

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

    spellmank
  • 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 /one then my table names would be one_albums, one_images, one_comments.

    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.
  • trisweb Administrator
    Yep, sounds like a problem. Can someone file a bug report? I'm going to sleep :)
  • trisweb Administrator
    Also everyone should know that it should still work without the constraints, as long as the tables got created.
  • Reported.

    Thanks, Tristan.
  • 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.
  • Zulan Member
    How do I change the table prefix?
  • trisweb Administrator
    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_";`
Sign In or Register to comment.