Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Moving servers. Upgraded 1.4 -> 1.5 - 1.6 Working old server, errors on new  (Read 549 times)

0 Members and 1 Guest are viewing this topic.

Michael O

  • Coppermine newbie
  • Offline Offline
  • Posts: 3

Hi,
Am moving a customer's site that includes a Coppermine Gallery,  to a new server/host. 
Was running on 1.4x, but new Server/Host has minimum of PHP 7.3 and up to PHP 8.

Lastnight I stayed up til early hours working through the two step upgrade from 1.4 to 1.5, then to latest ver of 1.6.  Did this on old server to ensure I got it working and so could do the upgrade with PHP 5.x before importing the DB tables and Coppermine folder to new server which is running PHP 7.3.

It is working fine after the upgrade on original server -  http://choppersaustralia.com/Chopper-Galleries/coppermine/

But once the Siteground Techs did the import of database and the Coppermine folder (from above working installation), it now gets the following error...


Code: [Select]
Fatal error: Uncaught Error: Call to undefined function ereg() in /{full link}/Chopper-Galleries/coppermine/include/debugger.inc.php:126 Stack trace: #0 /{full link}/Chopper-Galleries/coppermine/include/init.inc.php(26): require_once() #1 /{full link}/Chopper-Galleries/coppermine/index.php(68): require('/home/customer/...') #2 {main} thrown in /{full link}/Chopper-Galleries/coppermine/include/debugger.inc.php on line 126

Seems to have some issue with the debugger.inc.php file.  As a test I did try renaming the file extension from .php to something else on the debugger.inc.php in case that would bypass the error occurring, but same error remains.

Any suggestions on what to do?  I have tried searching and reading though a bunch of posts here on the forums, but can't work out what the solution is or what has caused it (other than I assume a difference from PHP 5.x to 7.3).

Process I performed to update from 1.4x to 1.6x was...
1. Backup Albums and the two PHP files.
2. Turn off plugins.
3. Delete all old files except album and the two PHP files.
4. Paste in latest CPG 1.5x files and folder structure.
5. Run upgrade.php
6. Run Update Database from admin.
7. Check files from in admin.
8. Added a couple new ver files into the albums folders based on Check File report.

Stage 2 - update to 1.6x
1. Backup Albums and the two PHP files.
2. Turn off plugins.
3. Delete all old files except album and the two PHP files.
4. Paste in latest CPG 1.5x files and folder structure.
5. Run upgrade.php - had issues not connecting to DB and changing from MYSQL to MYSQLI.  Eventually found editing to the new ver 1.6x "config.inc.php" file to have same DB, User, PW and prefix as old ver 1.5x file had. This enabled the upgrade.php file to function. 
7. Check files from in admin and ensure all up to date and present.
Coppermine all working as ver 1.6 on old server [ http://choppersaustralia.com/Chopper-Galleries/coppermine/ ] on PHP 5.5.38.

Assumed that once tables imported to new DB and files/folders moved over it should work on new server (running PHP 7.3), but not so lucky.


Thanks for any help you can offer.  Has been about a 3 day process so far and have the site's forums offline while making the transition to go live on new server - so would be great to work out how to get it fixed.

Michael O.
P.S. Thanks to the devs for Coppermine.  Has been a very good gallery system over the years.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1834

The Siteground techs didn't do a very good job.  There is no such function call in all of CPG 1.6.16,  let alone in include/debugger.inc.php.
I don't believe the issue stems from any PHP version (unless a server misconfiguration). My development version is on a Siteground account and I've had no issue with any PHP 7 or 8 version.
Maybe there was some corruption in what they imported.

You could try using the installer stub to load all the correct files.
Logged

Michael O

  • Coppermine newbie
  • Offline Offline
  • Posts: 3

Thanks Ron,
I will relay this to the Siteground techs and see what they can sort out.

Will let you know how we go.  Hopefully can get it sorted ASAP.  :)
Thanks
Michael Offe.
Logged

Michael O

  • Coppermine newbie
  • Offline Offline
  • Posts: 3

Hi Ron,
Have finally come back to getting this site migration finished (had a family crisis in between).

We have the Coppermine database correctly replicated on the new SiteGround Server now (there were some tables missing in last attempt). 

Current 1.6.16 files from old server also moved over.

But when you go to following link (new server) we still get this error...
http://www.choppersaustralia.com/Chopper-Galleries/coppermine/
----------------
Fatal error: Uncaught Error: Call to undefined function ereg() in /home/customer/www/choppersaustralia.com/public_html/Chopper-Galleries/coppermine/include/debugger.inc.php:126 Stack trace: #0 /home/customer/www/choppersaustralia.com/public_html/Chopper-Galleries/coppermine/include/init.inc.php(26): require_once() #1 /home/customer/www/choppersaustralia.com/public_html/Chopper-Galleries/coppermine/index.php(68): require('/home/customer/...') #2 {main} thrown in /home/customer/www/choppersaustralia.com/public_html/Chopper-Galleries/coppermine/include/debugger.inc.php on line 126
----------------

BUT...   If we go to the index page specifically, we don't get the error and it works fine...
http://www.choppersaustralia.com/Chopper-Galleries/coppermine/index.php

So the only difference is in entering the index.php into the browser. 
We checked that it was correctly set for index.php to be a default page and it is.
Have checked a few other ideas and can't work out what is causing this.

Just thought I would ask in case you had seen this before or had any thoughts.  I will also ask SiteGround if they can look at it as well.

Thanks
Michael.
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4849
    • Windsurf.me

As per above, try the installer stub. I is quite simple to use and hopefully will fix your issue. It certainly sounds like not all files were upgraded correctly.
Logged
It is a mistake to think you can solve any major problems just with potatoes.
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.