zenphoto forums » General Zenphoto Discussion

MySQL error on upgrade to 1.3.1

(5 posts)

Tags:

  1. markky99

    Member
    Joined: May '10
    Posts: 23

    Received an error on upgrading -

    "
    Zenphoto encountered an error
    MySQL Query ( UPDATE zp_administrators SET name = 'group', rights = '1968526677', custom_data = 'Users with full privileges', valid = '0' WHERE id=3; ) failed. MySQL returned the error Duplicate entry '0-administrators' for key 2"

    I have upgraded from a previous installation - is the install script trying to set up a new database when one is there already?

    Mark

    Posted 2 years ago #
  2. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,768

    What version did you upgrade from? This would be because there is an error in the options data which indicates that the "administrators" group needs to be created. Your best bet is to go to your database and drop the group and template entries from your administrators table that you did not create. (Look for entries with valid=0)

    Don't forget to read the Forum rules and usage resources
    Posted 2 years ago #
  3. markky99

    Member
    Joined: May '10
    Posts: 23

    I am/was updating from version 1.2.9.

    Looked at the zenphoto database and there was a duplicate "administrators" row showing valid = 0. Deleted it and I was then able to view my gallery. It reports version 1.3.1 now, so all is as it should be.

    Thanks for the pointer - heart was in mouth, even tho I did take a back-up!

    Mark

    Posted 2 years ago #
  4. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,768

    We will get a zenphoto fix for this into the nightly build. But what you did is a permanant fix as well.

    Don't forget to read the Forum rules and usage resources
    Posted 2 years ago #
  5. flick

    Member
    Joined: May '07
    Posts: 10

    Hullo!

    I'm having a similar sort of error upgrading from 1.2.6 RC1 to 1.3.1. I read this post and was wondering if this is because the dependency was only introduced in the final version of 1.2.6?

    This is the mySQL error message when I try and upgrade:

    MySQL Query ( UPDATE zen_administrators SET name = 'group', rights = '1968526677', custom_data = 'Users with full privileges', valid = '0' WHERE id=13; ) failed. MySQL returned the error Duplicate entry '0-administrators' for key 2

    so I tried to delete the row in zen_administrators that was valid=0. When I clicked the 'Go' button again, this message came up:

    MySQL Query ( UPDATE zen_administrators SET name = 'group', rights = '273', custom_data = 'Users allowed only to view zenphoto objects', valid = '0' WHERE id=12; ) failed. MySQL returned the error Duplicate entry '0-viewers' for key 2

    Deleting this then only causes a similar message (different idea) for the 'bozos' row.

    Deleting the (new and extra valid=0) bozos row then results in the zen_administrators error repeating itself, with an increasing 'id' value.

    I think I must be doing something wrong... but have no idea what it is.

    Any help would be much appreciated.

    EDIT: - Sorry, I just decided to try deleting all the 'valid=0' rows in the table as suggested. This allowed the upgrade to complete. Apologies for the gatecrash.

    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.