Reinstallation using same db

Hallo. In my hosting providers infinite wisdom they managed to delete all the files from my server. The mySQL database is still intact. What would be the best way to reinstate ZP? Initially I had it installed in a subdirectory www.mydomain.com/gallery/. Seeing as I am starting from scratch I will probably install it to the root directory. Will this cause any confusion if I use the same mySQL?

Comments

  • Pooks Member
    While attempting a reinstall I get the following:-

    Zenphoto Error
    MySQL Query ( SELECT `value` FROM `zp_options` WHERE `name`='admin_reset_date' AND `ownerid`=0 ) Failed. Error:Unknown column 'ownerid' in 'where clause'

    I presume this is because the old database entries are confusing things. How can I get past this without recreating new entries in the db?
  • You can add a column to the options database named `ownerid` which is int(11).

    It might be best for you to upgrade to the nightly build from last night. I believe this build will automatically fix this issue.

    Anyway, back to your first question. If you do not change the album structure of your gallery, just reload the albums and images via FTP. Just to be safe, once you have them all uploaded, run a Database Refresh. This will clean out any database entries that no longer have images/albums in the folders.
  • Pooks Member
    Thanks for the reply. I got a little drunk and did some stuff which appears to have worked. installed the nightly build and then ZenPhoto asked to do an upgrade and all seems to have gone well. A few bits and bobs to sort out but nothing too major hopefully. The search doesn't appear to be working as it should but thats not a major issue at the moment.
  • Pooks Member
    OK I take it back. I have just noticed that the pages aren't showing any of the descriptions/names etc. Any way of linking this back to the information stored in the db?
  • trisweb Administrator
    A couple requirements:

    1. The album folder names and the image filenames must *exactly* match the old ones.

    2. You have to be using the same database and prefix. I think you've got this already.

    Otherwise Zenphoto won't recognize any of the titles/descriptions as it will create new entries in the db for the new images.

    Also, there's a chance the old entries (which are now orphaned) will be cleaned up and deleted. So if you haven't already, I recommend backing up your database tables.
  • Pooks Member
    The album folders and image names are the same, the database wasn't altered apart from the Zenphoto reinstall. I can still see the original descriptions in the database and have a backup ready. The only change is where the domain is hosted. Before it was http://www.mydomain.com/gallery/ it is now http://www.mydomain.com/
  • Pooks Member
    hmm, some of the images appear to have retained the descriptions and titles while others haven't. Any suggestions?

    Another glitch...I had it set before to disallow viewing of the full image. For some reason it is now allowing it to link to the full image.

    -->Edit - Just noticed it appears to be running 1.15 updating now to see what happens. It looks as if the photos added after 1.16 are the ones missing descriptions.
  • The full image link option changed at some point. I am guessing between 1.1.5 and 1.1.6 given what you have said. Should be back once you are on the release the database was running against.
  • Pooks Member
    Ah, yep got it now. Thanks for your help.
Sign In or Register to comment.