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: PHP - minimum version allowed  (Read 3925 times)

0 Members and 1 Guest are viewing this topic.

eLIANT

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
PHP - minimum version allowed
« on: September 10, 2023, 04:57:12 pm »

I'm seeing some PHP "Deprecated" messages.
I'm running CPG 1.6.16 and PHP 8.1

What action should I take?
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: PHP - minimum version allowed
« Reply #1 on: September 10, 2023, 07:54:18 pm »

When you log into your gallery as an admin do you not get a message that there are upgrades available? Since your CPG version is nine releases behind current (1.6.25), you should maybe think about upgrading it.
Logged

eLIANT

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: PHP - minimum version allowed
« Reply #2 on: September 10, 2023, 09:03:41 pm »

Surely I'm just missing it, but I don't see on the CPG site where it actually states the current version (although there is a button to "Download latest version cpg1.5.48.zip").  Nor in my installation is there anywhere to "Check for Updates."
Logged

eLIANT

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: PHP - minimum version allowed
« Reply #3 on: September 10, 2023, 09:18:16 pm »

I'm being directed to SourceForge for my downloads.  Is that correct?
Logged

eLIANT

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: PHP - minimum version allowed
« Reply #4 on: September 10, 2023, 09:29:18 pm »

One more thing...
the cookie used by coppermine-gallery.net should store a "last visited date" so when the visitor comes back and the Last Visited Date was BEFORE the current release date, the page does a forced refresh.  That's why my download button said cpg1.5.48.zip.  I just refreshed the page and now that button points to cpg1.6.x/releases.
Logged

eLIANT

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: PHP - minimum version allowed
« Reply #5 on: September 10, 2023, 10:19:25 pm »

Attempted to V6 (got a fatal error), and now Config says I'm at 1.6.16 but I'm still getting the "Deprecated" errors.
I'll post the fatal upgrade error in a separate thread.
Logged

eLIANT

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: PHP - minimum version allowed
« Reply #6 on: September 11, 2023, 03:35:47 am »

Well, I logged out of everything, ran the update routine again...  success! 
But I'm still getting the "Deprecated" messages.

So we're back to the title question...  What is the minimum version of PHP allowed?  I need to downgrade my PHP to that version because CPG is making calls to procedures and functions in PHP 8.1 that are deprecated.
Logged

eLIANT

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: PHP - minimum version allowed
« Reply #7 on: September 11, 2023, 03:40:33 am »

Downgraded PHP to 7.4...  no more "Deprecated" messages.  So, I've answered my own question;  CPG does not work with PHP 8.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: PHP - minimum version allowed
« Reply #8 on: September 11, 2023, 05:24:21 am »

Downgraded PHP to 7.4...  no more "Deprecated" messages.  So, I've answered my own question;  CPG does not work with PHP 8.
The latest versions of CPG do indeed 'work' with PHP 8.  First of all, what version of CPG are you using?  If you are running the current latest version (1.6.25) of CPG, there should not any PHP messages causing failure. If that is what you are seeing with v1.6.25, please report the details. "It does not work" isn't very helpful.
Logged

406man

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 46
Re: PHP - minimum version allowed
« Reply #9 on: September 11, 2023, 08:39:58 am »

Are you running any plugins ?  If you are, one of these might be generating the message. Post the deprecated messages here as they will give a good pointer to the source of the error.
Logged

eLIANT

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: PHP - minimum version allowed
« Reply #10 on: September 11, 2023, 09:14:05 pm »

406man -- No plugins of my own.  Just whatever comes with the package.

ron4mac -- Now, I turned PHP 8 back on and took some screen shots...
Top image is of Home page right after logging in.
Second (larger) image is of User Manager.

All messages, and there are other screens beside these two, point to include/debugger.inc.php line 114.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: PHP - minimum version allowed
« Reply #11 on: September 11, 2023, 11:36:43 pm »

ron4mac -- Now, I turned PHP 8 back on and took some screen shots...
Top image is of Home page right after logging in.
Second (larger) image is of User Manager.
Please don't waste people's time if you are not running a current version of CPG. You are not running the latest version (1.6.25, at the moment). When you login as admin, you will from time to time (weekly, I believe), be notified that there are updates to your CPG version. From there, it only takes a couple clicks to perform the update. Please update to the latest version.
« Last Edit: September 12, 2023, 01:19:06 pm by ron4mac »
Logged

406man

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 46
Re: PHP - minimum version allowed
« Reply #12 on: September 12, 2023, 02:38:33 pm »

Trying to answer the original question about PHP supported versions….

Being very picky, you asked what is the minimum version of PHP supported. This would be PHP 7.0 with CPG 1.6.16   I think what you meant to ask is what is the highest / newest version of PHP supported without generating error messages about deprecated features.

If I’ve understood correctly, the feature described in the error message – conversion of false to array – was deprecated in PHP 8.1 according to the information here:
https://eusonlito.github.io/php-changes-cheatsheet/deprecated.html
So you need to go to the previous version line – 8.0.x

The Coppermine release notes here :
https://github.com/coppermine-gallery/cpg1.6.x/releases
… describe CPG 1.6.18 (two releases newer than yours) as being updated for use with PHP 8.1.x
…and CPG 1.6.16 as having improved compatibility with PHP 8

So I take from the above that the newest supported version with 1.6.16 is PHP 8.0.x   and any PHP 7 release will be safe from a compatibility perspective although not so good from a security and support perspective as it's getting old.
If you run a WAMP development environment it’s easy to swap between different PHP versions and test compatibility although you might need to download a specific PHP version from the WAMP site that’s not supplied with the WAMP distribution.
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.