lower the error reporting level in php.ini

how can I lower the error reporting level in php.ini?
Who is Participating?
ellandrdConnect With a Mentor Commented:
You don't need to change the error reporting in php.ini, you can do it on a script by script basis, which is neat for debugging only certain areas of code. for example:

// Turn off all error reporting

// Report simple running errors
error_reporting(E_ERROR | E_WARNING | E_PARSE);

// Reporting E_NOTICE can be good too (to report uninitialized
// variables or catch variable name misspellings ...)
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);

// Report all errors except E_NOTICE
// This is the default value set in php.ini
error_reporting(E_ALL ^ E_NOTICE);

// Report all PHP errors (bitwise 63 may be used in PHP 3)

Guy Hengel [angelIII / a3]Billing EngineerCommented:
full technical article:
SabrinAuthor Commented:
I dont want to get technical thats why im asking here!
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Guy Hengel [angelIII / a3]Billing EngineerCommented:
but changing the setting in the php.ini IS technical.
the doc tells you want value to set to get a certain behaviour.
the doc also tells you that you can change the behaviour at run time using error_reporting() function.

there are also other settings that can influence error display:

setting the error level to 0 will show no errors at all
SabrinAuthor Commented:
what If I have this (error_reporting  =  E_ALL) in php.ini
and this (LogLevel   crit) in httpd.conf

will I see any errors in the browser ?
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you will see all php errors, but only critical apache errors
If you see errors in the rowser depends on the php.ini setting display_errors. If its on all errors that match error_reporting are printed to screen. If display_errors is off no error (even fatal errors) will be displayed
thank you
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.