PHP - Strict Standards: Non-static method

postcd

Well-Known Member
Oct 22, 2010
721
21
68
Hello,

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

Strict Standards: Non-static method SmartyValidate::disconnect() should not be called statically in XXX on line XXX
Please how can i from WHM or CentOS command line set to ignore strict errors by default for all accounts?
 

mtindor

Well-Known Member
Sep 14, 2004
1,452
110
193
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 )
 
  • Like
Reactions: postcd

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,250
463
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.