1

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 
hakre
  • 193,403
  • 52
  • 435
  • 836
Noor
  • 19,638
  • 38
  • 136
  • 254
  • 3
    A line starting with `;` is a *comment*. Where are the actual configuration directives set? – deceze Nov 07 '11 at 03:22

1 Answers1

4

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);
hakre
  • 193,403
  • 52
  • 435
  • 836
Salman
  • 3,761
  • 2
  • 23
  • 34
  • I've set it but still getting the same problem – Noor Nov 07 '11 at 03:53
  • If you have changed php.ini file then you have to restart your Apache server first. These configuration can also be set in runtime in your php code -http://php.net/manual/en/function.error-reporting.php. So you should check for that too. – Salman Nov 07 '11 at 03:58
  • 1
    Still same problem even when i restart apache – Noor Nov 07 '11 at 05:11