forum.coppermine-gallery.net

Support => cpg1.6.x Support => cpg1.6 install => Topic started by: Grimlok on December 15, 2022, 10:56:33 am

Title: Fatal / Uncaught error when upgrading from 1.5.x to 1.6.x
Post by: Grimlok 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?
Title: Re: Fatal / Uncaught error when upgrading from 1.5.x to 1.6.x
Post by: phill104 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
Title: Re: Fatal / Uncaught error when upgrading from 1.5.x to 1.6.x
Post by: Grimlok 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.
Title: Re: Fatal / Uncaught error when upgrading from 1.5.x to 1.6.x
Post by: ron4mac 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.
Title: Re: Fatal / Uncaught error when upgrading from 1.5.x to 1.6.x
Post by: Grimlok 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
Title: Re: Fatal / Uncaught error when upgrading from 1.5.x to 1.6.x
Post by: FrA1l3 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!
Title: Re: Fatal / Uncaught error when upgrading from 1.5.x to 1.6.x
Post by: Joe Carver 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.