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
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
A work is in progress for compatibility with PHP 7.2 https://github.com/Piwigo/Piwigo/pull/834
Offline
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
error_reporting = E_ALL & ~E_DEPRECATED
Watch out if error_reporting is already set to exclude other flags, for example
error_reporting = E_ALL & ~E_NOTICE
then change that to
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
Offline
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
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
$conf['show_php_errors'] = E_ALL & ~E_DEPRECATED;
Offline