forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: Dark_Angel on January 24, 2020, 07:16:00 am

Title: Gallery and php version 7.0 or 7.1
Post by: Dark_Angel on January 24, 2020, 07:16:00 am
gallery 1.5.48 attempting to use php version 7.0 or 7.1

c-panel says that all versions of php to 7.0 have been deprecated. I attempted to change our bridged forum to 7.0, forum works but the gallery says:

Fatal error:  Uncaught Error: Call to undefined function mysql_connect() in /attic/cpg/include/functions.inc.php:183 Stack trace: #0 /attic/cpg/include/init.inc.php(171): cpg_db_connect() #1 /attic/cpg/index.php(26): require('/home/servername/...') #2 {main} thrown in /attic/cpg/include/functions.inc.php on line 183

needless to say am back to version 5.6Just thought I would let someone know and to see if 1.6 behaves with 7.1php
Title: Re: Gallery and php version 7.0 or 7.1
Post by: ron4mac on January 24, 2020, 03:41:35 pm
You should upgrade to CPG 1.6.x
https://forum.coppermine-gallery.net/index.php/topic,79013.msg383037.html#msg383037
Title: Re: Gallery and php version 7.0 or 7.1
Post by: Dark_Angel on January 24, 2020, 06:58:20 pm
ok, tis what I thought. thanks. Have a great day.
Title: Re: Gallery and php version 7.0 or 7.1
Post by: JustJoe on December 12, 2020, 07:17:04 pm
CPG faithful,

I have recently upgraded from Ubuntu 18.04 to 20.04...phew all went pretty smooth.
One issue is coppermine ver cpg1.6.x-1.6.06 stopped working.
I get this message when I surf to the GUI:

Fatal error: Uncaught Error: Call to a member function errorInfo() on null in /usr/local/src/cpg/cpg1.6.x-1.6.06/include/database/pdo/dbase.inc.php:71 Stack trace: #0 /usr/local/src/cpg/cpg1.6.x-1.6.06/include/init.inc.php(175): CPG_Dbase->getError() #1 /usr/local/src/cpg/cpg1.6.x-1.6.06/index.php(22): require('/usr/local/src/...') #2 {main} thrown in /usr/local/src/cpg/cpg1.6.x-1.6.06/include/database/pdo/dbase.inc.php on line 71

I saw this same error in this thread, so thinking there might be a known fix aside from re-installing cpg1.6 ???

The GUI is down right now, so any assistance on options to fix would be appreciated...

thx for your time in advance...
Title: Re: Gallery and php version 7.0 or 7.1
Post by: ron4mac on December 12, 2020, 10:58:59 pm
I have recently upgraded from Ubuntu 18.04 to 20.04...phew all went pretty smooth.
One issue is coppermine ver cpg1.6.x-1.6.06 stopped working.

The quickest fix is probably to switch to using mysqli instead of PDO:mysql.

In the include/config.inc.php file, change the dbtype to mysqli.

Code: [Select]
$CONFIG['dbtype'] =   'mysqli'; // Your database type

P.S. There is no need to double post.
Title: Re: Gallery and php version 7.0 or 7.1
Post by: JustJoe on December 13, 2020, 08:39:43 pm
CPG Faithful,

Original environment: Coppermine 1.6.06 on a fully patched Ubuntu 18.04 with mysql 5.7 & php 7.2

I was able to get Coppermine running on Ubuntu 20.04.  8)
The key was all about getting mysql "right"...

Current environment: Coppermine 1.6.09 on a fully patched Ubuntu 20.04 with mysql 5.7.32 & php 7.4.3

Ubuntu 20.04 upgrades mysql to v8, which I "think" Coppermine was not happy with.
I was able to remove/disable mysql v8 and then install mysql 5.7.32
Coppermine seems fine with PHP 7.4.3
I did a restore of my databases from backup...cpgdb, sys, mysql, performance_schema including ib* and auto.cnf files in the root /var/lib/mysql dir.
Start mysql and coppermine is now happy.
I also did run the run the cpg_installer_update.php to patch from .06 to .09

I will also say setting the debug_mode =1; was a must to get good information errors from Coppermine.

BTW:
Anyone modify Coppermine to digest images larger that 2MB yet?  Anyone want to collaborate on that?  My phone is taking 3-4MB images and I can't upload them to Coppermine  :-[
Other options?