Hi Piwigo
I Have just installed Piwigo in a docker container to work on some things for my normal piwigo.
Unfortunally I'm getting some errors in the top of the screen right from the start.
What can I do to fix them?
Here are the errors
"
Deprecated: Function create_function() is deprecated in /var/www/html/include/functions.inc.php on line 2165
Deprecated: Function create_function() is deprecated in /var/www/html/plugins/AdminTools/include/MultiView.class.php on line 41
Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /var/www/html/include/template.class.php on line 293
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/include/functions.inc.php:2165) in /var/www/html/include/page_header.php on line 101
"
Piwigo version: 2.9.3
PHP version: 7.2.4 [2018-04-29 11:41:13]
MySQL version: 5.5.5-10.2.14-MariaDB-10.2.14+maria~jessie [2018-04-29 11:41:13]
Piwigo URL: https://piwigo.dev.home.tanja84.dk/
PHP Info page: https://piwigo.dev.home.tanja84.dk/phpinfo.php
Offline
display_errors = on
Change this to off in your php configuration.
Offline
Thank you very much for the info.
I will try to message the maintainer of the docker container about how I do that
Offline
Unfortunally what I can see then that did not fix it because it says now display_errors Off but it still shows the messages
Offline
In that case you are enabling display_error somewhere else.
You can control it from within piwigo, using the plugin LocalFiles Editor. The tab for Local config should have the following:
<?php
$conf['show_php_errors'] = 0;
Last edited by Zentalquabula (2018-04-29 15:44:02)
Offline
Thank you very much that did remove the warnings by adding $conf['show_php_errors'] = 0; to local/config/config.inc.php
Offline
I have similar deprecation warnings after upgrading OpenSUSE Leap 42.3 to 15.0 - presumably with a newer PHP7 version (7.2.5) on the 'home' page:
Deprecated: Function create_function() is deprecated in
/srv/www/htdocs/photos/include/functions.inc.php on line 2165
Deprecated: Function create_function() is deprecated in
/srv/www/htdocs/photos/plugins/AdminTools/include/MultiView.class.php on line 41
Deprecated: Function create_function() is deprecated in
/srv/www/htdocs/photos/include/functions.inc.php on line 2165
<... 5 more the same ...>
Deprecated: The each() function is deprecated. This message will be suppressed
on further calls in /srv/www/htdocs/photos/include/template.class.php on line
293
Editing include/common.inc.php and changing the line
@ini_set('display_errors', true);
to
@ini_set('display_errors', false);
also worked for me (but I've gone with the LocalFiles method as tis should survive a Piwigo update)
Of course, this is using a hammer t crack a nut, when one only wants to suppress these deprecation warnings. And one trusts that the Piwigo team are even now working to code away these deprecated function calls...?
Offline
Yes they are. The project is open source and available on Github.
Offline