Announcement

#1 2018-01-25 09:01:23

andrewjs18
Member
2014-10-10
50

php 7.2 errors

hi,

I recently upgraded from php 7.0 to 7.2 and now my piwigo gallery is throwing these errors when I visit my site:

Deprecated: Function create_function() is deprecated in /public_html/include/functions.inc.php on line 2165

Deprecated: Function create_function() is deprecated in /public_html/plugins/AdminTools/include/MultiView.class.php on line 41

Deprecated: Function create_function() is deprecated in /public_html/include/functions.inc.php on line 2165

Deprecated: Function create_function() is deprecated in /public_html/include/functions.inc.php on line 2165

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /public_html/include/template.class.php on line 293

how can I temporarily fix these issues until piwigo is made to work with php 7.2 out of the box?


thanks!

Offline

 

#2 2018-01-25 21:22:08

executive
Member
2017-08-16
1214

Re: php 7.2 errors

andrewjs18 wrote:

how can I temporarily fix these issues until piwigo is made to work with php 7.2 out of the box?!

rewrite Piwigo?

http://php.net/manual/en/function.create-function.php

Offline

 

#3 2018-01-26 15:40:45

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

Re: php 7.2 errors

A work is in progress for compatibility with PHP 7.2 https://github.com/Piwigo/Piwigo/pull/834

Offline

 

#4 2018-01-26 16:58:37

erAck
Only trying to help
2015-09-06
1998

Re: php 7.2 errors

Apart from that, the "Deprecated:" messages are not errors but warnings that a function used will cease to exist in a future version of PHP. If you have access to your server's PHP configuration you can temporarily suppress these warning messages by excluding the E_DEPRECATED reporting flag with a statement in /etc/php.ini

Code:

error_reporting = E_ALL & ~E_DEPRECATED

Watch out if error_reporting is already set to exclude other flags, for example

Code:

error_reporting = E_ALL & ~E_NOTICE

then change that to

Code:

error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED

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

Offline

 

#5 2018-05-25 01:51:38

andrewjs18
Member
2014-10-10
50

Re: php 7.2 errors

hi all,

can I manually apply the changes highlighted in this github issue?

https://github.com/Piwigo/Piwigo/pull/834

my gallery has been broken for a for months now.  :(

Offline

 

#6 2018-08-12 13:23:12

erAck
Only trying to help
2015-09-06
1998

Re: php 7.2 errors

erAck wrote:

excluding the E_DEPRECATED reporting flag with a statement in /etc/php.ini

For completeness, Piwigo overrides the ini setting and the above works only if the Piwigo setting is 0 and rather should be done using LocalFiles Editor updating local/config/config.inc.php adding this

Code:

$conf['show_php_errors'] = E_ALL & ~E_DEPRECATED;

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

Offline

 

Board footer

Powered by FluxBB

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