Host Upgraded PHP Host Upgraded PHP
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Host Upgraded PHP

Started by Texas-Hunter, January 01, 2022, 11:24:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Texas-Hunter

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?


Texas-Hunter

Yeah, that would be a disaster for me to try and upgrade it to 1.6..

ron4mac

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.

Texas-Hunter

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??

phill104

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.
It is a mistake to think you can solve any major problems just with potatoes.

Texas-Hunter

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: :

Joe Carver

Double check if you still have your original file include/config.inc.php still in place, if not,
upload a backup copy.

ron4mac


Texas-Hunter

#9
It's all there...

<?php

    define 
'SILLY_SAFE_MODE' ) ;

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

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

?>

ron4mac

If you PM me your host credentials (Bluehost?), I'll see if I can help you get it running.

ron4mac

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.

Texas-Hunter

On the texas-hunters gallery, when I go there this is what I get.. I will get with HG on the PHP misconfiguration

ron4mac

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

phill104

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.
It is a mistake to think you can solve any major problems just with potatoes.

Texas-Hunter

I just want them to work so are you telling me that the T-H is dead?

Texas-Hunter

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.

ron4mac

They switched back to PHP 5.4

Texas-Hunter

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"

Texas-Hunter

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