forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 upgrading => Topic started by: ambivalentmaybe on November 14, 2015, 10:27:42 pm

Title: can't upgrade; update.php always wants to install new
Post by: ambivalentmaybe on November 14, 2015, 10:27:42 pm
Hello, board. I had a gallery active many years ago, and recently decided to try and revive it. Unfortunately, when I try to upgrade, the update.php script tells me my install is not working properly, and it installs a new gallery instead.

I get two error messages on the site (http://www.mudfog.org/mudmine/):
Notice: Undefined offset: 8192 in /mnt/stor12-wc2-dfw1/597084/614346/www.mudfog.org/web/content/mudmine/include/debugger.inc.php on line 112
Notice: Undefined offset: 8192 in /mnt/stor12-wc2-dfw1/597084/614346/www.mudfog.org/web/content/mudmine/include/debugger.inc.php on line 112

If I log in to the gallery, I get the "welcome" screen, but am then just returned to the homepage and have not been logged in, so I have no access to any of the admin screens. I tried restoring all the original files from the last version of Coppermine that worked (1.4.16), but get the same error messages.

If anyone has ideas about how to resolve the undefined offset issue and so complete the upgrade, I would very much appreciate it. Alternatively, I thought about installing a new gallery, and then using phpMyAdmin to import the old data from the 1.4x database into the new. If anyone could offer advice about how that process might work, that would also be great.

Thanks very much!
Title: Re: can't upgrade; update.php always wants to install new
Post by: gmc on November 15, 2015, 12:48:38 am
The undefined offset problem occurs with CPG 1.4 when running under current PHP levels.
You must complete the upgrade to 1.5 (or use an older level of PHP - but that isn't a long term fix.
You would not get these messages running update.PHP at 1.5.38.

What is the specific message from update.PHP?
Is your database/tables accessible using the connection info/credentials CPG knows about?
(Your ISP may have changed MySQL versions as well as PHP versions while your gallery was dormant.)
Title: Re: can't upgrade; update.php always wants to install new
Post by: ambivalentmaybe on November 15, 2015, 05:35:18 am
Quote
Coppermine Photo Gallery seems not to be installed correctly, or you are running coppermine for the first time. You'll be redirected to the installer. If your browser doesn't support redirect, click here.

Then I am forwarded to the license agreement (http://mudfog.org//mudmine/install.php). If I complete the install process, I have an empty (but functional) gallery.

I have to enter the database connection credentials during the upgrade process, but the script has no problems connecting and adding tables.

This is after following the instructions here: http://documentation.coppermine-gallery.net/en/upgrading.htm. I delete from the server all the Coppermine files save anycontent.php and the /albums directory, then upload all the files from the most recent version of Coppermine (not overwriting anycontent.php and /albums), then running update.php.

Title: Re: can't upgrade; update.php always wants to install new
Post by: phill104 on November 15, 2015, 08:33:55 am
You must also keep your include/config.inc.php file from your old install for the upgrade to work. That file contains the database details which is why coppermine is trying to start afresh
Title: Re: can't upgrade; update.php always wants to install new
Post by: ambivalentmaybe on November 16, 2015, 03:26:08 am
Well, that was the problem--Thanks! After copying config file back to the /include folder, update.php ran just fine, and with the new version installed I no longer have the error notices and can login to the admin screens without a problem.

I thought I *had* included the config file in previous attempts, but apparently not.

Thanks again!
Title: Re: can't upgrade; update.php always wants to install new
Post by: henry on September 07, 2016, 12:22:22 am
I had a similar problem.

Unless I missed something, the update documentation isn't crystal clear about restoring the original file include/config.inc.php to the new installation. But I did it anyway.

When it came to running the update script, I could not authenticate, using either the last known-good admin credentials or the mySQL account credentials.  (Which ones, exactly? I tried the dbuser and dbpass values as found in the old config.inc.php, but got nowhere.)

OK, just in case copying include/config.inc.php from the old to the new installation actually confuses the update script, I deleted it in the new installation -- of course, that was no help.     Then I restored it from a fresh reserve copy.   Now authentication succeeded.

I'm 99% certain I did it right the first time -- and I specifically checked that the new include/config.inc.php contained the same code as the old one.  I have no idea why the process failed until I copied the file again.

FWIW
Title: Re: can't upgrade; update.php always wants to install new
Post by: gmc on September 07, 2016, 01:46:42 am
Actually the 'update' documentation doesn't tell you to upload to a new directory.... doing so *IS* A new install.
The upgrade files get copied over your existing files - the package doesn't include the 'config.inc.php' file - so it wouldn't get overwritten.

Testing the upgrade somewhere else is always a good idea - but start with a copy of your working gallery and you should have no issue.
Title: Re: can't upgrade; update.php always wants to install new
Post by: henry on September 07, 2016, 05:16:14 am
Thanks!     I guess I figured it out in the end, because the updated cpg is functioning perfectly.