Announcement

#1 2020-08-10 01:25:13

Nigel-Aves
Member
2015-09-22
39

Tread Carefully if moving to PHP 7.4.x / MySQL 8

Community,

I recently built a new server using Ubuntu 20.04 LTS. This comes with PHP 7.4.x and MySQL 8

None of my PIWIGO gallery web sites would open, just a list of PHP error messages. ( https://piwigo.org/forum/viewtopic.php?id=30525 )

The ones I first had trouble with (at first) are: AdditionalPages and PWG_stuff.  erAck pointed me in the correct direction as Github did have changes for this issue / PHP 7.4 / AdditionalPages. I made all the changes by hand (not knowing GIThub at all). This worked. I then manually went through all the files in PWG_stuff and this worked as well. (I'm not a programmer BTW! .... just a geeky photographer :) )

I then discovered that there are issues with AdvancedMenuManager and META plugins. (these I have not solved on my own), but there are probably many plugins in use that have not been upgraded to run on PHP7.4.x / MySQL 8

So all I ask is, tread carefully if moving to PHP7.4.x ....

Nigel.

p.s. The main core of PIWIGO has been upgraded to run this version of PHP/ MySQL,  plugins seem to be the only issue.

Last edited by Nigel-Aves (2020-08-10 01:54:00)

Offline

 

#2 2020-08-10 01:31:05

erAck
Only trying to help
2015-09-06
1147

Re: Tread Carefully if moving to PHP 7.4.x / MySQL 8

As I said in the thread you pointed to, it's not about PHP 7.4 but MySQL 8, see there.


Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2020-08-10 01:55:44

Nigel-Aves
Member
2015-09-22
39

Re: Tread Carefully if moving to PHP 7.4.x / MySQL 8

erAck,

Sorry about that, I didn't quite understand that the issue was MySQL ... That's what happen when you let a non-programmer loose!

Nigel.

Offline

 

#4 2020-10-07 18:45:07

drewlander
Member
2020-10-07
20

Re: Tread Carefully if moving to PHP 7.4.x / MySQL 8

The only problem I have found is the implode function causes an error.  Anywhere the implode function exists with the parameters reversed will error in php 7.4.

: implode(): Passing glue string after array is deprecated. Swap the parameters in
/var/www/html/piwigo/include/dblayer/functions_mysqli.inc.php
on line
688

its not a database error so much as a database abstraction layer error relying on obsolete php functionality when calling the implode function.

Last edited by drewlander (2020-10-07 18:46:28)

Offline

 

#5 2020-10-07 20:05:36

drewlander
Member
2020-10-07
20

Re: Tread Carefully if moving to PHP 7.4.x / MySQL 8

These are the two functions that need to be corrected as seen below.  Array should be the second parameter in PHP7.4.  All other implode in the file are already written correctly. I did not check over the rest of the project or any plugins.


function pwg_db_concat($array)
{
  $string = implode(',',$array);
  return 'CONCAT('. $string.')';
}

function pwg_db_concat_ws($array, $separator)
{
  $string = implode(',',$array);
  return 'CONCAT_WS(\''.$separator.'\','. $string.')';
}

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2021 · Contact