My host upgraded the PHP from 5.4 to 7.4.26 and now my gallery is no longer showing up. When I go to the page I get Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/site/public_html/gallery/include/functions.inc.php:183 Stack trace: #0 /home/site/public_html/gallery/include/init.inc.php(171): cpg_db_connect() #1 /home/site/public_html/gallery/index.php(26): require('/home/site/pu...') #2 {main} thrown in /home/site/public_html/gallery/include/functions.inc.php on line 183
Looking at the versioncheck.php file it shows that it is 1.5.46.. What files do I need to replace in order to get this back to normal?
https://forum.coppermine-gallery.net/index.php/topic,79013.msg383037.html#msg383037
Yeah, that would be a disaster for me to try and upgrade it to 1.6..
Quote from: Texas-Hunter on January 02, 2022, 04:16:14 PM
Yeah, that would be a disaster for me to try and upgrade it to 1.6..
Unless you can get your host to provide PHP 5.x for you, there is little choice you have.
Some hosts let you select the version of PHP that you want to use (some on a directory level).
Using the method I linked to above to upgrade to CPG 1.6 has been done successfully by hundreds of people.
I just remembered I have an old website that is still active and has the same issue, I can use it as a sandbox to test.. So looking at the options what version should I go to and is the most stable??
The latest 1.6 is the best option. Take a backup first, both your site and database. You could also run a copy of your site on your desktop using WAMP or similar so you can test your upgrades first.
Quote from: Phill Luckhurst on January 03, 2022, 01:56:04 AM
The latest 1.6 is the best option. Take a backup first, both your site and database. You could also run a copy of your site on your desktop using WAMP or similar so you can test your upgrades first.
Well that did not go well.. It uploaded the package and then I get this little gem.. Nothing was changed on the database that I know of.. Any ideas when I go to correct this?
Coppermine critical error:
Unable to connect to database !
MySQLi said: :
Double check if you still have your original file include/config.inc.php still in place, if not,
upload a backup copy.
Also check that the db server in config.inc.php is simply localhost
https://forum.coppermine-gallery.net/index.php/topic,79013.msg387482.html#msg387482
It's all there...
<?php
define ( 'SILLY_SAFE_MODE' , 1 ) ;
$CONFIG['dbserver'] = 'localhost' ;
$CONFIG['dbuser' ] = '*********_' ;
$CONFIG['dbpass' ] = '**********' ;
$CONFIG['dbname' ] = '***********' ;
$CONFIG['TABLE_PREFIX'] = 'cpg_';
?>
If you PM me your host credentials (Bluehost?), I'll see if I can help you get it running.
Texas-Hunters
Apparently the password for Texas-hunters CPG database had been changed. I set it to what was in the config.inc.php and then it connected okay. I didn't continue the upgrade though because the previous version there was 1.5.12 ... a bit older than desired for a 1.6 upgrade.
Smoked-Meat
I put the update files in place. Unfortunately, Hostgator seems to have PHP mis-configured so mysqli (among other things) is not available in the smoked-meat space. They'll need to fix the problems with that before the upgrade can be accomplished.
On the texas-hunters gallery, when I go there this is what I get.. I will get with HG on the PHP misconfiguration
Quote from: Texas-Hunter on January 05, 2022, 07:34:32 PM
On the texas-hunters gallery, when I go there this is what I get..
Yes ... expected since the update wasn't done.
It's up to you whether you want to try the update even though the gallery is a bit older than fully recommended.
http://www.texas-hunters.com/gallery/update.php
I've edited the password and credentials from your post above. Probably a good idea to change your passwords now. Never a good idea to place sensitive details in a public forum.
I just want them to work so are you telling me that the T-H is dead?
Quote from: ron4mac on January 05, 2022, 06:46:14 PM
Smoked-Meat
I put the update files in place. Unfortunately, Hostgator seems to have PHP mis-configured so mysqli (among other things) is not available in the smoked-meat space. They'll need to fix the problems with that before the upgrade can be accomplished.
I did get with the host and they made some corrections and now the gallery looks to be live again.. I will need to go in a poke around.
They switched back to PHP 5.4
Quote from: Texas-Hunter on January 05, 2022, 07:59:47 PM
I did get with the host and they made some corrections and now the gallery looks to be live again.. I will need to go in a poke around.
I spoke too soon, tried to log in and
"Critical error There was an error while processing a database query"
Quote from: ron4mac on January 05, 2022, 08:02:15 PM
They switched back to PHP 5.4
Good grief... It cannot be at 5.4 it needs to be a 7 for my vBulliten to work