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: Fatal / Uncaught error when upgrading from 1.5.x to 1.6.x  (Read 3807 times)

0 Members and 1 Guest are viewing this topic.

Grimlok

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 9
Fatal / Uncaught error when upgrading from 1.5.x to 1.6.x
« on: December 15, 2022, 10:56:33 am »

Let me start by saying I hadn't updated BOTH my gallery and the server it was on in years. As such, the original situation was as follows:

1. CPG was at 1.5.8
2. Can't recall the exact version of MySQL, but it was old; probably 5.x
3. PHP was also really old, at 5.x
4. CPG was bridged to a forum on the same database
5. Everything was fully functional

Now, I updated PHP to 7.4, and MySQL to 8.0. Here I noticed that whenever I loaded my gallery, all I got was a blank screen. So, I used the cpg_installer_stub to do an in-place upgrade to 1.6.20.

After the stub got the files, I got this error when I proceeded:

Code: [Select]
Fatal error: Uncaught Error: Call to a member function numRows() on bool in xxxxxxx/gallery/bridge/udb_base.inc.php:360 Stack trace: #0 xxxxxxx/gallery/bridge/udb_base.inc.php(101): core_udb->get_user_data(104, Array, 1) #1 xxxxxxx/gallery/include/init.inc.php(252): core_udb->authenticate() #2 xxxxxxx/gallery/update.php(23): include_once('/home/xxxxxxx/...') #3 {main} thrown in xxxxxxx/gallery/bridge/udb_base.inc.php on line 360
I've done the following:
1. Set bridge_enable to 0 in my config table, then reran the stub - just got the same message as above
2. Tried accessing index.php after the failed upgrade - just got a "Fatal error:" message (nothing followed)
3. Reverted back to a 1.5.8 copy of my gallery files, and tried disabling bridging - just got a blank screen on both

Does anyone have an idea of where to begin?
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Fatal / Uncaught error when upgrading from 1.5.x to 1.6.x
« Reply #1 on: December 15, 2022, 04:25:20 pm »

You will get a blank screen on 1.5.8 as it is not compatible with PHP 7.x

To upgrade you should revert to PHP 5 then upgrade to the latest version of 1.5.x

Disable the bridge and update any incompatible plugins or themes.

When you have done that you can use the stub to upgrade to 1.6.x making user update.php runs at the end
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Grimlok

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 9
Re: Fatal / Uncaught error when upgrading from 1.5.x to 1.6.x
« Reply #2 on: December 15, 2022, 07:52:01 pm »

Thanks, I figured it was the mysql_connect() deprecation in PHP 7.x.

I'm unwilling to downgrade the live server back to PHP 5.x because I've already updated the rest of my site to current standards, so I'll probably just download a local copy to my computer and upgrade it slowly from there, then reupload both the files and tables.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Fatal / Uncaught error when upgrading from 1.5.x to 1.6.x
« Reply #3 on: December 15, 2022, 08:03:46 pm »

You can not upgrade directly from CPG 1.5.8 to CPG 1.6.x.  As stated in upgrade instructions, you should upgrade from CPG 1.5.20 or greater (best 1.5.48). So upgrade your local copy to 1.5.48 first.
Logged

Grimlok

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 9
Re: Fatal / Uncaught error when upgrading from 1.5.x to 1.6.x
« Reply #4 on: December 15, 2022, 08:05:19 pm »

I'll do that ron4mac, thank you.

In the meantime, before upgrading, I'm encountering a different issue on my local copy (login-related).

https://forum.coppermine-gallery.net/index.php/topic,80647.0.html
Logged

FrA1l3

  • Translator
  • Coppermine regular visitor
  • **
  • Country: es
  • Offline Offline
  • Posts: 78
    • ACMSB
Re: Fatal / Uncaught error when upgrading from 1.5.x to 1.6.x
« Reply #5 on: January 10, 2023, 03:26:49 pm »

Hello all!

I didn't read this thread and two days ago I change my PHP version from 7.4 to 8. For my surprise, I was can't login into Coppermine, the result was "500 Error http".
Afterwards, I put again PHP in 7.4 version and everything is going to live again!
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page
Re: Fatal / Uncaught error when upgrading from 1.5.x to 1.6.x
« Reply #6 on: January 10, 2023, 05:37:01 pm »

Run versioncheck.php & see if your plugins and/or theme, etc. needs to be updated.

Without a link to you gallery, that is just a guess from here.

Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.