Error Reporting?

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
net7
Forum Commoner
Posts: 31
Joined: Wed Mar 12, 2003 1:27 pm

Error Reporting?

Post by net7 »

I finally have my server up, but it doesn't report any errors. When there is an error the page is just blank. Does anyone know what setting I have to change in php.ini? I can't get it to work..
User avatar
scorphus
Forum Regular
Posts: 589
Joined: Fri May 09, 2003 11:53 pm
Location: Belo Horizonte, Brazil
Contact:

Post by scorphus »

You must set display_errors = On, take a look:
/etc/php4/apache/php.ini wrote:; 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 = Off

; 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 = Off

; 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 = On
So your server should be logging errors. It is commonly logged to /var/log/apache/error.log. Either you choose to switch display_errors to On (not recommended though as quoted above) or keep an opened terminal and type tail -f /var/log/apache/error.log to read the errors.

Cheers,
Scorphus.
net7
Forum Commoner
Posts: 31
Joined: Wed Mar 12, 2003 1:27 pm

Post by net7 »

Thanks :)
Post Reply