Announcement

#1 2018-04-29 13:49:48

Tanja84dk
Member
2016-05-28
5

[resolved] PHP errors on a fresh installed piwigo 2.9.3

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

 

#2 2018-04-29 15:16:44

Zentalquabula
Member
2014-05-10
217

Re: [resolved] PHP errors on a fresh installed piwigo 2.9.3

display_errors = on

Change this to off in your php configuration.

Offline

 

#3 2018-04-29 15:20:34

Tanja84dk
Member
2016-05-28
5

Re: [resolved] PHP errors on a fresh installed piwigo 2.9.3

Thank you very much for the info.

I will try to message the maintainer of the docker container about how I do that

Offline

 

#4 2018-04-29 15:39:51

Tanja84dk
Member
2016-05-28
5

Re: [resolved] PHP errors on a fresh installed piwigo 2.9.3

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

 

#5 2018-04-29 15:43:14

Zentalquabula
Member
2014-05-10
217

Re: [resolved] PHP errors on a fresh installed piwigo 2.9.3

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

 

#6 2018-04-29 15:47:15

Tanja84dk
Member
2016-05-28
5

Re: [resolved] PHP errors on a fresh installed piwigo 2.9.3

Thank you very much that did remove the warnings by adding $conf['show_php_errors'] = 0; to local/config/config.inc.php

Offline

 

#7 2018-06-06 15:19:24

daveo
Member
UK
2016-12-29
2

Re: [resolved] PHP errors on a fresh installed piwigo 2.9.3

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

 

#8 2018-06-06 21:03:34

executive
Member
2017-08-16
1214

Re: [resolved] PHP errors on a fresh installed piwigo 2.9.3

Yes they are. The project is open source and available on Github.

Offline

 

Board footer

Powered by FluxBB

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