SQL Error on Upbgrade

I just upgraded to 1.3.1 from 1.2.6 and I am getting:

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

Any help on what I need to do would be appreciated. Thanks!

Comments

  • Hmmm didnt seem to take...

    I just upgraded from 1.2.6 to 1.3.1 and when I click Go I get:
    Zenphoto encountered an error
    MySQL Query ( UPDATE `zp_administrators` SET `name` = 'group', `rights` = '1968526677', `custom_data` = 'Users with full privileges', `valid` = '0' WHERE id=7; ) failed. MySQL returned the error Duplicate entry '0-administrators' for key 'valid'
    It wont let me do anything from here. Help please.
  • As is said on the registration page, we're moderating posts on new users since we've had a recent influx of spam. Sorry for the confusion.

    As to your issue, you can find more information in this thread:

    http://www.zenphoto.org/support/topic.php?id=7892#post-46748

    Your problem is a bug and has already been fixed in the nightly builds. Or you could fix it manually. Either way works.
  • Ah gotcha - thanks.

    That fixed it - deleted all the rows with valid=0 and reran setup.php. Thank you!
  • How exactly does an dumb amateur like myself go about finding and deleting rows to see if that fixes my sudden errors after an upgrade? tech support for my hosting service said they were at a loss for how to fix what i'm experiencing. Essentially i now can only see 2 of 5 or 6 user accounts. they mentioned reaching out to this forum for help.
    Since you will moderate this first message and can delete aspects of it if you like, I'll cut and paste messages from Bluehost in case it helps:

    Your ZenPhoto site, based on the MySQL errors it is returning, appears to have a database on one version of ZenPhoto and the files on another. If this was a
    recent upgrade, it may be wise to roll back to a full system backup. Looking at the data within the SimpleScripts backups, it doesn't appear that they are undoing changes that may have been made to the database during upgrade, so these
    would not be valid options for reversion.
    If you were to attempt to roll back to a SimpleScripts backup, it's not going to remove the data added during upgrade, ending up with extra data in the database
    would explain the errors that seem to be popping up now. To reliably get things back on track you will need to get the database and the filesystem back in sync.

    #2 (after I mentioned I tried backups and they failed to fix issue)

    Hello,
    I looked at your zenphoto installation along with Scott, and we cannot see a way to fix this except by re-installing the program.

    If our backups won't be able to assist you in restoring the installation, I don't know what else to offer. Perhaps the makers of the zenphoto program can recommend a fix or a patch. You could try contacting them before you decide to
    scrap it.

    I'm sorry for the inconvenience.

    ----------
    Is there anything you can do to help me get things back in order? I still can't see all of the user names I have created (and would like to add a new one but can't do that either).
    Unfortunately, I am not a skilled database / tech person.
    Any help you can provide would be great!!
    I really don't want to start over on this rather large photo project.
    Thanks.
  • For you, the best approach would be to install the nightly build if you are getting this error.
  • acrylian Administrator, Developer
    Also the bluehost answer mentions "SimpleScripts". If you installed via these helper scripts we don't and can't support that (and mention it on variouse places like the install instructions and the forum rules).

    Please install manually as we describe on our installation instructions.
  • sbillard -- thank you but i don't know enough about this kind of thing to have any idea how to do that. hopefully i'm not really a 2nd class citizen because found you via Simple Scripts, and i really like your software, but something isn't quite right with the 'users' tab. any and all detailed help would be extremely awesome.
  • acrylian Administrator, Developer
    As sbillard said try the nightly build. You find the link on our download page. Again, we don't support installs via SimpleScript and similar tools.

    What exactly is not right with the users tab? We really need more info if we should be able to help.
  • yes, i saw the link and nightly build info, but i still don't know what to do with it.

    as for the users tab, it used to show all users created (approx. 7 at the time) and now it shows just two. delete one and the next one suddenly gets displayed. want to add one? not an option.

    struggling with understanding why help for that is too much to ask for but it's your software so i can respect the fact that you get to make the rules...
  • You install the nightly build following the installation/upgrade instructions on the WEB site.
    struggling with understanding why help for that is too much to ask for but it's your software so i can respect the fact that you get to make the rules
    Well, until now you have not even told us what was happening. How do you expect help if you don't say what is happening. As to simplescripts (etc.) what we have found is that these install programs leave things screwed up with Zenphoto causing problems that even we do not understand. It is really up to the creators of these scripts to support them. Not something we can do.

    For instance, the problem you describe makes absolutely no sense. (Not saying that it is not what you are seeing, but just that it "can't happen" with a properly installed Zenphoto.)

    So, bottom line, the recommendation is and always has been for you to install the nightly build. Sorry if that is a challenge for you, but I know of no other approach to solving the problems.
  • actually, this quote "Essentially i now can only see 2 of 5 or 6 user accounts." from the start told you what was happening. Further, the instructions (not just the advice) don't make sense to me, again, as a "dumb amateur like myself", so I guess i'm just out of luck.
  • OK, sorry, but we really do not have the resources to train you in WEB/Internet technology. Perhaps your host can help if you point them to the instructions.

    Anyway, certainly the problem is caused by installing with simplescripts (as apparently you are not able to install in the normal manner) Please contact the authors of simplescripts for further aid.
Sign In or Register to comment.