New installation with old database

Something has gone wrong with my ZenPhoto 1.4.5.8 installation. It now shows only the raw text of the zenphoto.cfg.php file instead of the index.php.

I'm trying to reinstall either 1.4.5.8 (I still have the tarball) or the latest 1.4.5.9 and then pop in the MySQL database and albums folder to restore my data. But the setup page overwrites the tables in my database every time. If I let it create new tables (with a different prefix) and then change the prefix (to point to my old tables) after the new installation is up and running, it just puts me back in setup and wants to wipe out my tables again.

I do not have access to ZenPhoto's backup function, since ZenPhoto is not running at all with my old data.

Is there any way to make a fresh installation of ZenPhoto and then insert my old albums and database?

Alternately, do you know what might have caused my old installation to display the raw text of the config file, but allow the new installations to display correctly? Maybe I can just fix the old installation.

Comments

  • acrylian Administrator, Developer
    So was this a 1.4.5.8 install taht suddenly broke or did you upgrade to it before that. If from what version. From older versions directly may work adn often does but there is no guarantee.
    http://www.zenphoto.org/news/installation-and-upgrading

    The raw text of the config file could have lots of causes like wrong file/folder permissions or configuration issues like wrong php version on your server etc. You really should look into your server error log.

    The above link has instructions about moving installations which is what you basically need to do if you want to re-setup a new install. If you don't have a database backup you will loose all data entererd. You can move the albums folder manually, if you entered descriptions or something via the backend that will be lost without said database backup.
  • It was a working 1.4.5.8 install that suddenly broke. I have a backup of the database made directly from the MySQL server using CPanel, but I can't get the restored database to integrate with the fresh install of 1.4.5.8. (And the albums folder is intact.)

    All of the instructions I can find about moving installations assume that I can run the database backup from within ZenPhoto, which I can't do :(

    I have searched more than once in the help forums and on Google to try to find more information, but I have not been successful. If you can point me to additional advice on how I can restore a MySQL database backup into a fresh ZenPhoto installation, I would be most appreciative.

    Thanks!
  • acrylian Administrator, Developer
    If the database backup is from the actual broken site and the database maybe the problem (which I don't know) you will of course always get a broken database again if you import it.

    Did you try to remove the config file and just create a new one? What do the various error logs say? You did not mention that base information.

    In any case you need to find out what actually broke, the database, file folder permissions of the config file or else.

    If you find out it is a certain table you could export the working tables (instead of the whole database) separately using tools like phpMyAdmin or similar´and then import those tables on the new install. Then run setup to create the missing ones. Be sure to copy your albums before that as Zenphoto as the gallery is file system based.
  • Thank you for the advice and suggestions. I went back to my old installation (that had been previously working), removed the whole zp-data directory, and re-ran the setup. That seems to have fixed things.
    Thanks again.
Sign In or Register to comment.