Upgrading to v1.6 from...? PHP outdated... Upgrading to v1.6 from...? PHP outdated...
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Upgrading to v1.6 from...? PHP outdated...

Started by jwkohl, March 20, 2021, 02:13:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jwkohl

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

phill104

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
It is a mistake to think you can solve any major problems just with potatoes.

jwkohl

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

phill104

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.
It is a mistake to think you can solve any major problems just with potatoes.

stefanbartelski

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
Cadillac & LaSalle Club webmaster

phill104

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.
It is a mistake to think you can solve any major problems just with potatoes.