forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: Walkinman on June 16, 2021, 01:55:36 am

Title: Fatal Error suddenly showing up
Post by: Walkinman on June 16, 2021, 01:55:36 am
hey folks,

I realize this is an older version of CPG, but I just don't have time to update it at the moment. Google just pointed me to an error that uddeny started showing up pn m cpg galleries. Shows up as

Quote
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/skolai5/public_html/stock/include/functions.inc.php:183 Stack trace: #0 /home/skolai5/public_html/stock/include/init.inc.php(171): cpg_db_connect() #1 /home/skolai5/public_html/stock/index.php(26): require('/home/skolai5/p...') #2 {main} thrown in /home/skolai5/public_html/stock/include/functions.inc.php on line 183

Can anyone please point to a quick fix for this? hopefully, thanks.

Site is www.skolaiimages.com .. all cpg stuff is inside www.skolaiimages.com/stock/

Thank you.
Cheers
Carl
Title: Re: Fatal Error suddenly showing up
Post by: ron4mac on June 16, 2021, 04:29:43 am
Your host has changed the default PHP version to 7.x.  The quick fix is to get them to change it back to version 5.6

It appears you were running CPG 1.5.46 ... so you could easily and quickly upgrade it using this method (https://forum.coppermine-gallery.net/index.php/topic,79013.msg383037.html#msg383037).
Title: Re: Fatal Error suddenly showing up
Post by: Walkinman on June 16, 2021, 09:47:40 pm
Thanks for that ron .. however I just lost all of the changes and tweaks I had made to my theme, which were more than substantial. Bummer. I guess I didn't realise that simply upgraded everything.

I do have a backup on my host server, but don't even know how to begin resolving this now. If I restore to my previous version, is there a simple way to fix the error without upgrading to a new cpg that will require me spending hours trying to re-configure my theme etc?

Thanks
Title: Re: Fatal Error suddenly showing up
Post by: Phill Luckhurst on June 17, 2021, 08:05:03 am
Not really. There are a lot of changes required to get PHP7 to work. So far better to update your custom theme to work with the latest release, which in most cases is not too much effort.
Title: Re: Fatal Error suddenly showing up
Post by: Walkinman on June 17, 2021, 10:16:12 pm
OK, thanks. In my case it's quite a process, but I'll save the files from the previous version and update as I can later in the fall.

Thank you.
Title: Re: Fatal Error suddenly showing up
Post by: ron4mac on June 18, 2021, 01:16:55 am
If you have your old files, rename the folder that was your theme with modifications (water_drop?) to something else and copy it into your CPG themes folder.
Follow these guide lines (https://coppermine-gallery.net/demo/cpg15x/docs/en/theme_create.htm#theme_create) for your custom theme (which you should have done in the beginning instead of modifying a CPG included theme directly). You should then be able to select your custom theme and have all your modifications back.