Noor
Noor

Reputation: 20130

Php Error Reporting even when display error is on

I'm getting a problem with my php scripts. No error reporting is being made in spite that in my php.ini that i've set display error everywhere

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

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

; error_reporting
;   Default Value: E_ALL 
;   Development Value: E_ALL
;   Production Value: E_ALL 

Upvotes: 1

Views: 1728

Answers (1)

Salman
Salman

Reputation: 3726

You have to use these:

display_errors = On
display_startup_errors = On
error_reporting = E_ALL 

With no ; at the start of the line. That is a comment and just disables the directive.

Edit: To use runtime configuration, just add these two lines at the beginning of your php script:

error_reporting(E_ALL);
ini_set("display_errors", 1);

Upvotes: 4

Related Questions