The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP - Strict Standards: Non-static method

Discussion in 'General Discussion' started by postcd, Apr 27, 2014.

  1. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    624
    Likes Received:
    6
    Trophy Points:
    18
    Hello,

    it is several cpanel account where i see errors on websites saying something about non static method...

    Please how can i from WHM or CentOS command line set to ignore strict errors by default for all accounts?
     
  2. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    In your global php.ini file ( /usr/local/lib/php.ini ) you could set the error_reporting:

    error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
    - shows all except for notices and deprecation warnings

    error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
    - shows all except for notices and strict standards warnings

    error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
    - shows all except for notices, deprecation warnings and strict standards warnings

    After modifying error_reporting, you will probably need to restart apache ( /scripts/restartsrv_apache )
     
    postcd likes this.
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Note that you could also modify the "error_reporting" setting using the "Advanced Mode" via "WHM Home » Service Configuration » PHP Configuration Editor".

    Thank you.
     
Loading...

Share This Page