PHP Strict Standards - Error flood in log file after upgrade

Having trouble installing serendipity?
Post Reply
dyfustic
Regular
Posts: 7
Joined: Sat Jul 07, 2012 8:52 am
Location: München
Contact:

PHP Strict Standards - Error flood in log file after upgrade

Post by dyfustic »

Hi,

after updating to PHP 5.4.4 and S9Y 1.6.2 these errors occur in my logfile and there are not just a few ones, the log file is being flooded with those error messages.

Code: Select all

[Tue Jul 03 21:58:34 2012] [error] [client 66.249.72.207] PHP Strict Standards:  Non-static method serendipity_plugin_api::get_event_plugins() should not be called statically in /path/installation/blog.addict.de/serendipity/include/plugin_api.inc.php on line 1041
[Tue Jul 03 21:58:34 2012] [error] [client 66.249.72.207] PHP Strict Standards:  Non-static method serendipity_plugin_api::hook_event() should not be called statically in /path/installation/blog.addict.de/serendipity/include/functions_entries.inc.php on line 1090
[Tue Jul 03 21:58:34 2012] [error] [client 66.249.72.207] PHP Strict Standards:  Non-static method serendipity_plugin_api::hook_event() should not be called statically, assuming $this from incompatible context in /path/installation/blog.addict.de/serendipity/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php on line 252
[Tue Jul 03 21:58:34 2012] [error] [client 66.249.72.207] PHP Strict Standards:  Non-static method serendipity_plugin_api::get_event_plugins() should not be called statically, assuming $this from incompatible context in /path/installation/blog.addict.de/serendipity/include/plugin_api.inc.php on line 1041
I disabled error logging to save diskspace. ;-) The blog seems to work fine, there just one umlaut issue I just posted in the bugs forum.

My questions:
1) Is this a S9Y code issue?
2) Or is the a (PHP) configuration issue (apart from disabling error logging to "solve" this. ;-) )
3) Or is this a PHP version issue with some incompatibility with S9y
4) Or something else?

If you need more information just ask.

dyfa
nikki 'dyfa' britz
@dyfustic auf Twitter
http://blog.addict.de
http://photo.addict.de
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: PHP Strict Standards - Error flood in log file after upg

Post by Timbalu »

It is a change in PHP 5.4, which now reports E_STRICT errors on default.
Change and set to

Code: Select all

error_reporting(E_ALL & ~E_NOTICE ^ E_STRICT);
in serendipity_config.inc.php ~ line 54.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: PHP Strict Standards - Error flood in log file after upg

Post by garvinhicking »

Hi!

Basically, yes, S9y is not meant to work with E_STRICT. This simply goes against an untyped scripting languages; E_STRICT completely changes the idea of how a scripted file should look like, and this goes against some coding styles we have collected in the past, where we only initialize unsafe variables, but work with less lines of code. We have tried to change many of these things to adapt to PHP 5.4 in our 1.7 and 2.0 trees though...

(Other than that, what Timbalu writes should help you :) )

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
dyfustic
Regular
Posts: 7
Joined: Sat Jul 07, 2012 8:52 am
Location: München
Contact:

Re: PHP Strict Standards - Error flood in log file after upg

Post by dyfustic »

Hi,

thanks. My logfiles went back to normal. ;-)

dyfa
nikki 'dyfa' britz
@dyfustic auf Twitter
http://blog.addict.de
http://photo.addict.de
Post Reply