Advanced search  

News:

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.
[more]

Pages: [1]   Go Down

Author Topic: Host Upgraded PHP  (Read 1767 times)

0 Members and 1 Guest are viewing this topic.

Texas-Hunter

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Host Upgraded PHP
« 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?
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1836
Logged

Texas-Hunter

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Host Upgraded PHP
« Reply #2 on: January 02, 2022, 04:16:14 pm »

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

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1836
Re: Host Upgraded PHP
« Reply #3 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.
Logged

Texas-Hunter

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Host Upgraded PHP
« Reply #4 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??
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4849
    • Windsurf.me
Re: Host Upgraded PHP
« Reply #5 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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Texas-Hunter

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Host Upgraded PHP
« Reply #6 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: :
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1510
  • aka 'i-imagine'
    • Home Page
Re: Host Upgraded PHP
« Reply #7 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.

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1836
Re: Host Upgraded PHP
« Reply #8 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
Logged

Texas-Hunter

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Host Upgraded PHP
« Reply #9 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_';

?>
« Last Edit: January 05, 2022, 07:39:08 pm by Phill Luckhurst »
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1836
Re: Host Upgraded PHP
« Reply #10 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.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1836
Re: Host Upgraded PHP
« Reply #11 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.
Logged

Texas-Hunter

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Host Upgraded PHP
« Reply #12 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
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1836
Re: Host Upgraded PHP
« Reply #13 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
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4849
    • Windsurf.me
Re: Host Upgraded PHP
« Reply #14 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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Texas-Hunter

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Host Upgraded PHP
« Reply #15 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?
Logged

Texas-Hunter

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Host Upgraded PHP
« Reply #16 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.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1836
Re: Host Upgraded PHP
« Reply #17 on: January 05, 2022, 08:02:15 pm »

They switched back to PHP 5.4
Logged

Texas-Hunter

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Host Upgraded PHP
« Reply #18 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"
Logged

Texas-Hunter

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Host Upgraded PHP
« Reply #19 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
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 19 queries.