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: Errors upgrading to latest version  (Read 693 times)

0 Members and 1 Guest are viewing this topic.

pk_PwD

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Errors upgrading to latest version
« on: April 11, 2022, 11:31:21 am »

Website: Photographerswithdisabilities.org
Host: IPage
Coppermine version 1.5x has been running OK with the host PHP set to 5.3. IPage have advised me, as I was having problems with website updates, to upgrade coppermine to run on their highest version of PHP which is 7.4
I have uploaded the latest Coppermine version cpg1.6x (PHP 8.?) and overwritten all the Coppermine files in the folder weebly/photo, with the exception of the albums folder and the file anycontent.php, which I renamed in the upload.
With the PHP set at 7.4 I ran the update script photographerswithdisabilities.org/photo/update.php and got the following error message

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /hermes/bosnacweb08/bosnacweb08ax/b368/ipg.photographerswithd1/weebly/photo/include/functions.inc.php:183 Stack trace: #0 /hermes/bosnacweb08/bosnacweb08ax/b368/ipg.photographerswithd1/weebly/photo/include/init.inc.php(171): cpg_db_connect() #1 /hermes/bosnacweb08/bosnacweb08ax/b368/ipg.photographerswithd1/weebly/photo/update.php(23): include_once('/hermes/bosnacw...') #2 {main} thrown in /hermes/bosnacweb08/bosnacweb08ax/b368/ipg.photographerswithd1/weebly/photo/include/functions.inc.php on line 183

I changed the PHP to 5.3 and ran the updater again and got this message

Fatal error: Call to a member function numRows() on a non-object in /hermes/bosnacweb08/bosnacweb08ax/b368/ipg.photographerswithd1/weebly/photo/bridge/udb_base.inc.php on line 360


I contacted IPage support and had the foloowing reply

Hello Paul,
 
Thank you for getting back to us. I’m Alwyn looking into the website issue. I understand it is important the website display all the pages correctly.
 
From the case notes, I understand the gallery page images are not displaying with higher PHP versions at: https://photographerswithdisabilities.org/photo/
 
I have accessed the gallery page and was able to replicate the ‘Fatal Error’ message with higher PHP versions.
 
The issue is caused by the MySQL connection function used in the PHP versions. The older PHP versions were using the connection function as ‘mysql_connect()’. This function is upgraded in the higher PHP versions PHP 7.0 and above.
 
The updated connection function is ‘mysqli_connect()’. Therefore any applications/websites using the PHP version 7.0 and above should have updated connection functions.
 
Currently, the ‘Coppermine’ application is still using the old connection function. This is the reason it works only on lower PHP versions. I understand you tried to update the application. However, it appears the ‘Coppermine’ application is still using the old connection function for the database.
 
I’m afraid this is the reason the gallery page displays the error message with higher PHP versions 7.0 and above.
 
To fix this issue, the database connection function has to be updated from ‘mysql_connect()’ to ‘mysqli_connect()’ in the ‘Coppermine’ application.
 
It is advisable to contact the support team of the ‘Coppermine’  application for help in getting this upgraded. Alternatively, if they ask to update any other settings from our server end to make this work, please reply back to this email with relevant information. We are happy to help you.
 
Alternatively, you can try creating a new page on Weebly and use the gallery/image options available in the Weebly editor and upload the images. Once that is done, please verify if that is working as expected. Later you may remove/delete the old gallery page.
 
Please feel free to reach out in case of additional questions. We are happy to help.

Regards,
Alwyn D
Escalated Support


Help  please

Best regards

Paul
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4841
    • Windsurf.me
Re: Errors upgrading to latest version
« Reply #1 on: April 11, 2022, 12:41:36 pm »

Seems like some of the files failed to upgrade properly. Please try the method outlined here - https://forum.coppermine-gallery.net/index.php/topic,78505.msg381584.html#msg381584
Logged
It is a mistake to think you can solve any major problems just with potatoes.

pk_PwD

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Errors upgrading to latest version
« Reply #2 on: April 11, 2022, 01:52:12 pm »

I uploaded upgrader.php and ran it using http://photographerswithdisabilities.org/photo/upgrader.php

I had the following error message

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /hermes/bosnacweb08/bosnacweb08ax/b368/ipg.photographerswithd1/weebly/photo/include/functions.inc.php:183 Stack trace: #0 /hermes/bosnacweb08/bosnacweb08ax/b368/ipg.photographerswithd1/weebly/photo/include/init.inc.php(171): cpg_db_connect() #1 /hermes/bosnacweb08/bosnacweb08ax/b368/ipg.photographerswithd1/weebly/photo/updater.php(18): require('/hermes/bosnacw...') #2 {main} thrown in /hermes/bosnacweb08/bosnacweb08ax/b368/ipg.photographerswithd1/weebly/photo/include/functions.inc.php on line 183

Any ideas?
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1811
Re: Errors upgrading to latest version
« Reply #3 on: April 11, 2022, 06:05:48 pm »

First, edit include/config.inc.php and delete any line containing $CONFIG['dbtype'] =
Then use the method here to get all the files for the newest CPG version (currently 1.6.18).
After the files are placed and you click the Complete Install button, make sure to select mysqli as the database type.
Logged

pk_PwD

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Errors upgrading to latest version
« Reply #4 on: April 14, 2022, 06:02:15 am »

Hi Ron4Mac,

I followed your instructions and got the following error message after pressing complete installation. There was not an option to ensure that MySQLi was selected

Coppermine critical error:
Unable to connect to database !

MySQLi said: :


Help

Paul
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1811
Re: Errors upgrading to latest version
« Reply #5 on: April 14, 2022, 09:30:20 pm »

See PM from me ...
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1811
Re: Errors upgrading to latest version
« Reply #6 on: April 15, 2022, 03:48:45 pm »

The include/config.inc.php file was missing existing database information.
Logged

pk_PwD

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Errors upgrading to latest version
« Reply #7 on: April 15, 2022, 03:53:13 pm »

Thankyou, brilliant, I thought that the Gallery would never see the light of day again.

Paul
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 20 queries.