Page 1 of 1

error reporting problem in PHP (Mac OS X)

Posted: Thu Oct 23, 2003 7:16 am
by faheemhameed
Hi there,

I wanted to know how to turn on the error reporting in PHP.

error_reporting (E_ALL) does not work.

This gives no error message when there is actually an error but just a blank page.

OS : Mac OS X version 10.2.6
PHP : version 4.3.3 ( precomplied version downloaded from http://www.entropy.ch/software/macosx/php/)
Apache Webserver: version 1.3.26 ( came with Mac OS X)
Machine: Power PC G4


Thanks for your help

Hameed

Posted: Thu Oct 23, 2003 7:26 am
by volka
you cannot effect the handlig of parse errors within the (main-)script. They occur before the script is executed. In your php.ini you probably will find a section

Code: Select all

;   - Show all errors
;
error_reporting  =  ...

; Print out errors (as a part of the output).  For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below).  Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.
display_errors = ...

; Even when display_errors is on, errors that occur during PHP's startup
; sequence are not displayed.  It's strongly recommended to keep
; display_startup_errors off, except for when debugging.
display_startup_errors = ...

; Log errors into a log file (server-specific log, stderr, or error_log (below))
; As stated above, you're strongly advised to use error logging in place of
; error displaying on production web sites.
log_errors = ...
These settings are present before the script gets parsed.

Errors and warning should also be logged in the webserver's error.log by default.

Posted: Thu Oct 23, 2003 8:11 am
by faheemhameed
Thanks volka,

I got the errors to show.

Cheers,
Hameed