forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 upgrading => Topic started by: Texas-Hunter on January 01, 2022, 11:24:17 pm

Title: Host Upgraded PHP
Post by: Texas-Hunter on January 01, 2022, 11:24:17 pm
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
Code: [Select]
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?
Title: Re: Host Upgraded PHP
Post by: ron4mac on January 01, 2022, 11:42:26 pm
https://forum.coppermine-gallery.net/index.php/topic,79013.msg383037.html#msg383037
Title: Re: Host Upgraded PHP
Post by: 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..
Title: Re: Host Upgraded PHP
Post by: ron4mac on January 02, 2022, 06:28:42 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.
Title: Re: Host Upgraded PHP
Post by: Texas-Hunter on January 02, 2022, 10:58:54 pm
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??
Title: Re: Host Upgraded PHP
Post by: phill104 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.
Title: Re: Host Upgraded PHP
Post by: Texas-Hunter on January 04, 2022, 09:41:21 pm
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: :
Title: Re: Host Upgraded PHP
Post by: Joe Carver on January 05, 2022, 12:39:50 am
Double check if you still have your original file include/config.inc.php still in place, if not,
upload a backup copy.
Title: Re: Host Upgraded PHP
Post by: ron4mac on January 05, 2022, 12:42:29 am
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
Title: Re: Host Upgraded PHP
Post by: Texas-Hunter on January 05, 2022, 01:47:28 pm
It's all there...

Code: [Select]
<?php

    define 
'SILLY_SAFE_MODE' ) ;

    
$CONFIG['dbserver'] = 'localhost' ;
    
$CONFIG['dbuser'  ] = '*********_' ;
    
$CONFIG['dbpass'  ] = '**********' ;
    
$CONFIG['dbname'  ] = '***********'   ;

    
$CONFIG['TABLE_PREFIX'] = 'cpg_';

?>
Title: Re: Host Upgraded PHP
Post by: ron4mac on January 05, 2022, 02:38:01 pm
If you PM me your host credentials (Bluehost?), I'll see if I can help you get it running.
Title: Re: Host Upgraded PHP
Post by: ron4mac on January 05, 2022, 06:46:14 pm
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.
Title: Re: Host Upgraded PHP
Post by: Texas-Hunter on January 05, 2022, 07:34:32 pm
On the texas-hunters gallery, when I go there this is what I get.. I will get with HG on the PHP misconfiguration
Title: Re: Host Upgraded PHP
Post by: ron4mac on January 05, 2022, 07:39:21 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
Title: Re: Host Upgraded PHP
Post by: phill104 on January 05, 2022, 07:40:42 pm
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.
Title: Re: Host Upgraded PHP
Post by: Texas-Hunter on January 05, 2022, 07:47:15 pm
I just want them to work so are you telling me that the T-H is dead?
Title: Re: Host Upgraded PHP
Post by: Texas-Hunter on January 05, 2022, 07:59:47 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.
Title: Re: Host Upgraded PHP
Post by: ron4mac on January 05, 2022, 08:02:15 pm
They switched back to PHP 5.4
Title: Re: Host Upgraded PHP
Post by: Texas-Hunter on January 05, 2022, 08:02:36 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"
Title: Re: Host Upgraded PHP
Post by: Texas-Hunter on January 05, 2022, 08:04:03 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