LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   error_reporting in php.ini, how to configure? (https://www.linuxquestions.org/questions/programming-9/error_reporting-in-php-ini-how-to-configure-894052/)

Mr. Alex 07-27-2011 06:53 AM

error_reporting in php.ini, how to configure?
 
Hi!
What exactly should "error_reporting" line look like to enable all error reportings?

Comments say:
Code:

;  Developments Value: E_ALL | E_STRICT
So should it be
Code:

error_reporting = E_ALL | E_STRICT
?

angel115 07-27-2011 07:10 AM

yes this is fine:
Code:

error_reporting = E_ALL | E_STRICT
but you need to turn on the display of these errors:
Code:

display_errors = On
Also don't forget to turn that off on production server

Mr. Alex 07-28-2011 04:32 AM

I have
Code:

display_errors = On
;  Default Value: On
;  Development Value: On
;  Production Value: Off

; display_startup_errors
;  Default Value: Off
;  Development Value: On
;  Production Value: Off

error_reporting = E_ALL | E_STRICT
;  Default Value: E_ALL & ~E_NOTICE
;  Development Value: E_ALL | E_STRICT
;  Production Value: E_ALL & ~E_DEPRECATED

in this file and tried to execute php code:

Code:

<?php
$a = 9 / 0;
echo $a;
?>

It gave me no error. Just blank page.


All times are GMT -5. The time now is 07:13 PM.