Skip to main content

error_reporting in php

Comments

4 comments

  • Benito

    Hello! 

    I tried to put only this and still all the error reports disappear, on the screen and error_log

    error_reporting "E_ALL"
    0
  • cPanelPeter cPanel Staff

    Hello, 

    Reading the https://www.php.net/manual/en/function.error-reporting.php page, it looks like what you want is 

    error_reporting "~E_WARNING"

    The tilde character means NOT.  So do NOT report warnings.  

     

     

    0
  • quietFinn

    I think it must be:
    error_reporting = E_ALL & ~E_NOTICE

    error_reporting is an integer value, and E_ALL  and E_NOTICE are predefined constants.

    0
  • Benito

    Hello!

    cPanelPeter I tried but the same thing happens to me. The error_log file stops being generated, not even with other errors.

    quietFinn I have to put it in quotes because cPanel also saves this in .htaccess and if it doesn't have quotes, the website gives an error 500.

    0

Please sign in to leave a comment.