PHP 5.4 problems

Discussion in 'Developers' Forum' started by xaver, Mar 20, 2012.

  1. xaver

    xaver New Member

    Hello,

    i tested 5.4 a little bit and got some errors:
    PHP:
    Strict Standards:  Non-static method SimplePie_Misc::parse_date() should not be called staticallyassuming $this from incompatible context in /usr/local/ispconfig/interface/lib/classes/simplepie.inc.php on line 60

    Strict Standards
    :  Non-static method SimplePie_Parse_Date::get() should not be called staticallyassuming $this from incompatible context in /usr/local/ispconfig/interface/lib/classes/simplepie.inc.php on line 10870
    i fixed some notice errors

    regards
    xaver
     
  2. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Have you tried to define both methods as static?
     
  3. xaver

    xaver New Member

    No, but i will look into it.

    I fixed some other PHP 5.4 Notice Errors.
    e.g.
    if $conf['country'] is not defined and $conf = array() is defined it will drop an notice error if you use $conf['country']
    i did s small if..
    (isset($conf['country']) ? $conf['country'] : '')
     
  4. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    I guess that there is a wrong variable used, the country settings in ISPConfig are in the variable $conf['language'] and not $conf['country'] (there is no separate contry setting available, so replacing the variable should fix the error.
     
  5. xaver

    xaver New Member

    Its in client and reseller in list. (My last commit)
    Also i think it was readData witch had an error with readData['demo_viewmode']
    or
    Notice: Undefined variable: maintenance_mode_error in /usr/local/ispconfig/interface/web/login/index.php on line 238

    Looks like each array element need a "isset() && condition(e.g. == != > <= ...)" the possibility exists its not set, because the element will be created.

    I turned two functions into static functions and it looks like it works.
     
    Last edited: Mar 20, 2012
  6. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    I fixed that in svn and changed the country setting to language.
     
  7. xaver

    xaver New Member

    Sorry. i dont understand.
     
    Last edited by a moderator: Mar 22, 2012
  8. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    This was a spam post, I removed that now. I edited your post and removed the spam link that you quoted with his message :)
     
  9. xaver

    xaver New Member

    Oh i saw no link, maybe blocked by my Browser and addons.

    i will commit simplepie with static functions. Looks like it works fine.

    can you take a look at commit 3011? fixed a lot of stuff for php 5.4. (+ i think small bug -> see comment)

    Last know errors are at FAQ management, but i think the problem is of the wrong use of list/template system.

    mail_transport_edit and mail_user_edit have a lot of @. That is bad because if a real problem comes around you won't see it.
     
  10. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Thanks!

    Looks fine :) Thanks for fixing the php notices.

    I guess we should consider to rewrite the faq module so that it uses the trmaplt system correctly. Might be cleaner then building workarounds to get the sorting functions to work with the current code.

    That should be changed in the long term indeed. I made a todo item in the bugtracker.
     
  11. rygotype

    rygotype New Member

    Have these fixes been pushed for an update? I'm still seeing these errors in my ispconfig admin area.
     
  12. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Yes, that has all ben fixed. I guess you use the wrong error reporting level. the level required by ispconfig is:

    E_ALL & ~E_NOTICE
     
  13. rygotype

    rygotype New Member

    I currently have the
    Code:
    error_reporting
    set as
    Code:
    E_ALL & ~E_NOTICE 
    However, Still seeing errors like these in the ISPCONFIG3 area:

    Code:
    Strict Standards: Non-static method SimplePie_Misc::parse_date() should not be called statically, assuming $this from incompatible context in /usr/local/ispconfig/interface/lib/classes/simplepie.inc.php on line 60
    
    Strict Standards: Non-static method SimplePie_Parse_Date::get() should not be called statically, assuming $this from incompatible context in /usr/local/ispconfig/interface/lib/classes/simplepie.inc.php on line 10870
     
  14. tomnhanni

    tomnhanni New Member

    This post is older but I have similar warnings in my apache error.log

    my ISPConfig is a fresh install version 3.0.5.3 on Debian wheezy (perfect server) with Apache/2.2.22 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_fcgid/2.3.6

    in my php5/cgi/php.ini i have the default value

    Code:
    error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
    I still get apache error.log filled up with this

    Code:
    ...
    [Fri Nov 29 09:16:08 2013] [warn] [client XX.XX.XX.XX] mod_fcgid: stderr: in /usr/local/ispconfig/interface/lib/classes/simplepie.inc.php on line 9195, referer: https://XX.XX.XX.XX:8080/index.php
    [Fri Nov 29 09:16:08 2013] [warn] [client XX.XX.XX.XX] mod_fcgid: stderr: PHP Strict Standards:  Non-static method SimplePie_Misc::entities_decode() should not be called statically in /usr/local/ispconfig/interface/lib/classes/simplepie.inc.php on line 9195, referer: https://XX.XX.XX.XX:8080/index.php
    [Fri Nov 29 09:16:08 2013] [warn] [client XX.XX.XX.XX] mod_fcgid: stderr: PHP Strict Standards:  Non-static method SimplePie_Misc::entities_decode() should not be called statically in /usr/local/ispconfig/interface/lib/classes/simplepie.inc.php on line 9195, referer: https://XX.XX.XX.XX:8080/index.php
    [Fri Nov 29 09:16:08 2013] [warn] [client XX.XX.XX.XX] mod_fcgid: stderr: PHP Strict Standards:  Non-static method SimplePie_Misc::entities_decode() should not be called statically in /usr/local/ispconfig/interface/lib/classes/simplepie.inc.php on line 9195, referer: https://XX.XX.XX.XX:8080/index.php
    [Fri Nov 29 09:16:08 2013] [warn] [client XX.XX.XX.XX] mod_fcgid: stderr: PHP Strict Standards:  Non-static method SimplePie_Misc::entities_decode() should not be called statically in /usr/local/ispconfig/interface/lib/classes/simplepie.inc.php on line 9195, referer: https://XX.XX.XX.XX:8080/index.php
    [Fri Nov 29 09:16:08 2013] [warn] [client XX.XX.XX.XX] mod_fcgid: stderr: PHP Strict Standards:  Non-static method SimplePie_Misc::element_implode() should not be called statically, assuming $this from incompatible context in /usr/local/ispconfig/interface/lib/classes/simplepie.inc.php on line 14990, referer: https://XX.XX.XX.XX:8080/index.php
    [Fri Nov 29 09:16:08 2013] [warn] [client XX.XX.XX.XX] mod_fcgid: stderr: PHP Strict Standards:  Non-static method SimplePie_Misc::element_implode() should not be called statically, assuming $this from incompatible context in /usr/local/ispconfig/interface/lib/classes/simplepie.inc.php on line 14990, referer: https://XX.XX.XX.XX:8080/index.php
    ...
    I realize these are just warnings but I would like to eliminate them if possible. Any ideas?

    Thanks
     
  15. Croydon

    Croydon Member Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

  16. tomnhanni

    tomnhanni New Member

    Ok thanks, I'll try that.
     
  17. tomnhanni

    tomnhanni New Member

    yep that seems to have fixed it. Thanks
     

Share This Page