Advanced search  


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.

Pages: [1]   Go Down

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

0 Members and 1 Guest are viewing this topic.

Michael O

  • Coppermine newbie
  • Offline Offline
  • Posts: 2

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 -

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/ Stack trace: #0 /{full link}/Chopper-Galleries/coppermine/include/ require_once() #1 /{full link}/Chopper-Galleries/coppermine/index.php(68): require('/home/customer/...') #2 {main} thrown in /{full link}/Chopper-Galleries/coppermine/include/ on line 126

Seems to have some issue with the file.  As a test I did try renaming the file extension from .php to something else on the 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 "" 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 [ ] 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.


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

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/
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.

Michael O

  • Coppermine newbie
  • Offline Offline
  • Posts: 2

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.  :)
Michael Offe.
Pages: [1]   Go Up

Page created in 0.018 seconds with 20 queries.