forum.coppermine-gallery.net

Support => cpg1.6.x Support => cpg1.6 upgrading => Topic started by: jwkohl on March 20, 2021, 02:13:03 pm

Title: Upgrading to v1.6 from...? PHP outdated...
Post by: jwkohl on March 20, 2021, 02:13:03 pm
Hello, everyone.  Hope someone can help me.  I've been running CPG for a long time, and let my site get a bit outdated.  It has now crashed because they updated PHP and I'm not sure what version of CPG I had before, nor how to fix this so it's operational again without losing everything. 

Part of the problem is that PHP updated, which means I can no longer use CPG, I just have errors.  PHP is now updated to v7.3.6
The errors I'm getting are:
Several of these "Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP"; for Inspekt_Error, Inspekt_Cage, Inspekt_Supercage, and cpg_debugger for depreciated constructors, and a fatal error, "Uncaught Error: Call to undefined function mysql_connect()"...

I'm guessing that I need to just install 1.6 from scratch?  How to I make sure it captures my old entries without error?  Obviously, I know just enough to be dangerous with PHP, but I don't want to lose all my years of hard work.

Thanks!

JK
Title: Re: Upgrading to v1.6 from...? PHP outdated...
Post by: Phill Luckhurst on March 20, 2021, 06:32:52 pm
Hello and welcome to the forum.

First thing I would ask is for your host to temporarily restore php5.x so you can take backups etc.

Once done, remove any plugins you have installed.

Here is a great guide to what to do from there - https://forum.coppermine-gallery.net/index.php/topic,79013.0.html
Title: Re: Upgrading to v1.6 from...? PHP outdated...
Post by: jwkohl on March 20, 2021, 08:18:39 pm
Thanks Phill...that's an answer I didn't expect.  I'll open a ticket today...what if they decline to acquiesce to my request?  :)

Cheers!

JK
Title: Re: Upgrading to v1.6 from...? PHP outdated...
Post by: Phill Luckhurst on March 20, 2021, 09:20:25 pm
Then we can still do it, but a few things are a little harder. Most hosts are understanding, some have an option in their control panel and others you just put an entry in your .htaccess file. So nothing to worry about.
Title: Re: Upgrading to v1.6 from...? PHP outdated...
Post by: stefanbartelski on April 22, 2021, 08:37:22 pm
I am facing a similar situation. I inherited a Coppermine site that turned out to be VERY old and way behind in updates (version 1.3.2 in config.php). My current server service provider allows me to backdate the PHP version to 7.0 but not further. I have access to all the files, most importantly the Albums, that had been set up in the old version. Is there a process whereby I could re-install CPG as the latest version and then rebuild/reconnect the albums? As this was inherited and we have little or no support from the old webmaster I do not need to rebuild in the exact same model or with specific plug-ins (AFAIK), just need to make sure that the pictures are restored.

Stefan Bartelski
Cadillac & LaSalle Club webmaster
Title: Re: Upgrading to v1.6 from...? PHP outdated...
Post by: Phill Luckhurst on April 22, 2021, 09:17:12 pm
Probably the safest way to do this is to do it locally on your desktop. This is what I would do.

Install WAMP, making sure to use a version what supports PhP5. On a Mac you can use MAMP. Get it running and make sure PHP5 is the running PHP version.

Using PHPmyadmin take a backup of your database and then on your desktop, using the same tool import that database.

Copy your Coppermine folder from your host to the WWW directory in WAMP

Edit your local /include/config.inc.PHP to point to the newly imported database.

On your local machine run update.PHP and then see if your Coppermine install is working locally. Test thouroughly.

From there, on your local machine update to 1.4.x and again test thoroughly. Do the same for 1.4-1.5 again, check thoroughly and be sure to follow all instructions and details on our forums regarding plugins and themes etc.

Once you are on 1.5.x at the correct level upgrade to 1.6.x and again, test thoroughly and make sure all plugins and themes are at compatible versions.

Backup everything on your live host once again.

Delete every file on your live host except the /albums directory. This is because Linux on your host is case sensitive, on Windows it is not so you really want to keep your albums folder on your live host as is. You will however see a slight difference if you compare /albums and itís sun directories with your local version, and that is each will have for security an index.htm file. When you have finished best add these to all directories and sub directories of your live /albums folder if they do not exist.

On your local machine take a backup of your database, again using phpmyadmin and then import this on your live host.

Copy all files and folders, except /albums, from your local machine to your live host

On your live host edit include/config.inc.PHP to point to your new database

Run update.PHP

Now hopefully at this point you should be all up and running again. While the above sounds complicated, it should take only an hour or two if all goes smoothly at each stage. This method also gives you the advantage that you have tested your update and have a working version locally should anything go wrong.