error reporting problem in PHP (Mac OS X)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
faheemhameed
Forum Newbie
Posts: 5
Joined: Thu Oct 23, 2003 1:35 am

error reporting problem in PHP (Mac OS X)

Post 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
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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.
faheemhameed
Forum Newbie
Posts: 5
Joined: Thu Oct 23, 2003 1:35 am

Post by faheemhameed »

Thanks volka,

I got the errors to show.

Cheers,
Hameed
Post Reply