Announcement

#1 2020-06-04 21:42:51

homdax
Member
Sweden
2015-02-02
294

Switching PHP version from 5.4 to 7.1 or higher

I am forced to upgrade the PHP version on a long standing gallery with thousands of images and hundreds of hotlinks. Something happened that is making https not work properly and from my investigation it could very well be an old php version that is at least part the culprit.

There is really only one question, will piwigo handle a sudden switch from 5.4 to 7.2 or even later? There are no code modifications.

Piwigo 2.10.2
Operating system: Linux
PHP: 5.4.45
MySQL: 5.5.5-10.1.45-MariaDB
Graphics Library: External ImageMagick 6.9.10-68

Last edited by homdax (2020-06-04 21:43:54)

Offline

 

#2 2020-06-04 23:48:04

executive
Member
2017-08-16
1214

Re: Switching PHP version from 5.4 to 7.1 or higher

Piwigo will be fine. You may see some notices from extensions.

Offline

 

#3 2020-06-06 15:19:28

homdax
Member
Sweden
2015-02-02
294

Re: Switching PHP version from 5.4 to 7.1 or higher

Thanks, however I will be doing the following

- create a new webhost account dedicated to the url of the sub site in question, yes it can be done.
- import existing site to that place, with a bit of downtime

I have a test config I will run this on (on the same web server with same setup) since I am not certain if I should set PHP version before I move the site, or after. Maybe silly question, but things I need to consider.

Last edited by homdax (2020-06-06 15:31:43)

Offline

 

#4 2020-06-06 20:46:10

executive
Member
2017-08-16
1214

Re: Switching PHP version from 5.4 to 7.1 or higher

it doesn't matter when you switch it

Offline

 

#5 2020-06-09 14:28:43

homdax
Member
Sweden
2015-02-02
294

Re: Switching PHP version from 5.4 to 7.1 or higher

All went fine, even with 7.3 but docs here says 7.1 is recommended.

Offline

 

#6 2020-06-09 16:04:36

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: Switching PHP version from 5.4 to 7.1 or higher

homdax wrote:

All went fine, even with 7.3 but docs here says 7.1 is recommended.

That's right, we should update that! Even PHP 7.4 should be OK, but for sure 7.3 is compatible.

Offline

 

#7 2020-06-15 10:00:11

homdax
Member
Sweden
2015-02-02
294

Re: Switching PHP version from 5.4 to 7.1 or higher

Thanks plg

Offline

 

#8 2021-02-22 09:20:39

hosh
Member
2021-01-28
9

Re: Switching PHP version from 5.4 to 7.1 or higher

When I upgrade from php 5.6 to 7.1 or 7.3 I get mysql errors.
Moving back to 5.6 makes it okay, but my shared host will soon be upgrading the php version across all domains.

The errors I get (I've obscured the domain part of the address)


Warning: mysqli::__construct(): The server requested authentication method unknown to the client [mysql_old_password] in /xxx   /photos-piwigo/include/dblayer/functions_mysqli.inc.php on line 52

Warning: mysqli::__construct(): (HY000/2054): The server requested authentication method unknown to the client in / xxx  /photos-piwigo/include/dblayer/functions_mysqli.inc.php on line 52

Warning: my_error(): Couldn't fetch mysqli in / xxx /photos-piwigo/include/dblayer/functions_mysqli.inc.php on line 856

Warning: my_error(): Couldn't fetch mysqli in xxx  /photos-piwigo/include/dblayer/functions_mysqli.inc.php on line 856
Piwigo encountered a non recoverable error
[mysql error ]
Can't connect to server

#1    my_error  xxx  /photos-piwigo/include/common.inc.php(113)
#2    include_once xxx   /photos-piwigo/index.php(11)

Offline

 

#9 2021-02-22 11:58:50

erAck
Only trying to help
2015-09-06
2023

Re: Switching PHP version from 5.4 to 7.1 or higher

hosh wrote:

Warning: mysqli::__construct(): The server requested authentication method unknown to the client [mysql_old_password] in /xxx   /photos-piwigo/include/dblayer/functions_mysqli.inc.php on line 52

Warning: mysqli::__construct(): (HY000/2054): The server requested authentication method unknown to the client in / xxx  /photos-piwigo/include/dblayer/functions_mysqli.inc.php on line 52

The net is full of such questions, some even with answers. For example see
https://stackoverflow.com/questions/146 … ion-method
https://www.joe0.com/2014/11/02/how-to- … ion-error/

Your hoster will have to switch the MySQL/MariaDB password format as well to the "new" (now years old) format. Maybe, if MySQL is already configured to use the new scheme for new accounts, it could help if you reassigned a new password to the database account. If in doubt, ask your hoster.


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

Offline

 

#10 2021-02-22 12:35:48

hosh
Member
2021-01-28
9

Re: Switching PHP version from 5.4 to 7.1 or higher

thanks!  I will check.

Offline

 

#11 2021-03-15 04:19:57

hosh
Member
2021-01-28
9

Re: Switching PHP version from 5.4 to 7.1 or higher

solved (on hostgator) by creating a new db user, assigning the user to the database, then updating the configuration file with the new user details at
(my piwigo directory)  /local/config/database.inc

Offline

 

Board footer

Powered by FluxBB

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