Recovering an old zenphoto gallery

Hello, I'm trying to recover an old ZenPhoto DB and have a number of questions, especially since it's on a different host than originally (DB prefix's now in play). I'd like to get it up and running before looking at upgrading it.

I am unsure what version I have, but from one error message I received I think it's Zenphoto 1.4.9 [36167d6556]. My first question is what version of PHP might be suitable? I can go back as far as 4.4 and 5.1-5.6 are available too (as well as newer).

The new host makes us use prefixes for the DB & User name so I changed this in the cfg:
$conf['mysql_prefix'] = "myprefix_";
That will apply to both the mysql_user and mysql_database fields, and NOT to such things as mysql_pass or mysql_host, right?

I also have a question about these fields:
$conf['album_folder'] = '/albums/';
$conf['album_folder_class'] = 'std';
The actual path to the album folder is /home/example/public_html/gallery/albums/ - the cfg file says album_folder is relative to the zenphoto folder, but the leading '/' on '/albums/' worries me.

Comments

  • Ah, I see this in the cfg: $conf['db_software'] = "MySQLi";

    I think that means we must have been using PHP 5.0 or higher, right? I'm currently debugging with 5.2

  • acrylian Administrator, Developer

    I don't know when "MySQLi" was introduces but as far my records tell that Zenphoto 1.4.2-1.4, iss PHP 5.2.+, since 1.5. PHP 5.6-7, since 1.6 PHP 7-8.1

    $conf['mysql_prefix'] = "myprefix_";
    That will apply to both the mysql_user and mysql_database fields, > and NOT to such things as mysql_pass or mysql_host, right?

    Yes, that is the database table prefix.

    $conf['album_folder'] = '/albums/';
    $conf['album_folder_class'] = 'std';

    You don't need to set/change these on a standard install at all. That is only if using a renamed albums folder and/or an external one (e.g above web root).

    For upgrading in general this procedure also applies for old installs:
    https://www.zenphoto.org/news/installation-and-upgrading/#--upgrading

  • Yes, that is the database table prefix.

    Does it apply to the user(name) as well? If not, perhaps I can take the prefix back to empty and hardcode the myprefix_ in the mysql_database and mysql_user fields directly?

    Thanks!

  • The prefix has nothing to do with the database name or the database user name. It is there to allow database sharing. The standard zenphoto table names (albums, images, etc.) are prepended with the prefix so that they are unique. If your database contains only a single installation's zenphoto tables the prefix should probably be empty and the standard table names not prepended by anything.

    At any rate, the defined prefix must be identical to whatever prepends the actual database table names. Otherwise the software will not be able to access the tables.

  • Hi, thanks for clarifying that for me! I see I was a bit confused, and confirmed our table names do not have a prefix. My ISP does however force our ISP username as the first X characters of the user & database names - that's what threw me off. So, I have set the prefix back to "" and then hardcoded the user & database names with the first X characters.

    I'm still getting a 500 error, and having trouble tracking that down. I've been reading the "white screen" thread and our .htaccess looks good with "RewriteBase /gallery".

    I'm still able to access the old host, and over there I get this message:

    Zenphoto has detected a change in your installation.
    Zenphoto 1.4.9[36167d6556] has been copied over an unknown release.
    The change detected is critical. You must run setup for your site to function.

    However, I don't think anything got copied over, though something might have become corrupted over the years(?). I wonder what triggers that message. Would failure to access the DB be a reason?

    Any idea where / what system log file to look at?
    Further troubleshooting thoughts appreciated!

Sign In or Register to comment.