Disabling PHP notices to error.log

Discussion in 'General' started by Norman, Feb 22, 2013.

  1. Norman

    Norman Member HowtoForge Supporter

    Hi

    What is the recommended way to disable PHP notices to a clients error log?
    I dont want to disable it for all clients , but just for specific site.

    Any ideas? :)

    [Wed Feb 20 17:56:38 2013] [warn] [client x.x.x.x] mod_fcgid: stderr: PHP Notice: Undefined index: account_id in /var/www/clients/clientX/webX/web/backend/system/commons.php on line 188, referer: http://X

    The PHP scripts already contain <?php ini_set('display_errors', 0); ini_set("log_errors", 0); ini_set("error_reporting", null); error_reporting(0); session_start(); but they still seem to report notices.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    which php mode do ou use in that website?
     
  3. Norman

    Norman Member HowtoForge Supporter

    Should be fast-cgi. :)
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Then you can set a custom error reporting level for this site in the php.ini field of the options tab of the website.
     
  5. Norman

    Norman Member HowtoForge Supporter

    To disable all notices to error log, what would I enter?
    Im a bit uncertain of the syntax for this field.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    To show all errors except of notices, use this level:

    error_reporting = E_ALL & ~E_NOTICE
     

Share This Page