Where is the detailed PHP error output?

I know there is an HTTP error log in ~/logs//http/error, but it contains nothing about PHP errors for my sites. On other hosts I’ve used, there has been a separate PHP error log which shows error and/or debugging output from PHP itself. I don’t get any of this in my error log, instead, errors, warnings, etc. are printed directly to the user. How can I get this output in the error log instead?

I’m running PHP as CGI, for what it’s worth.

I think you’ll have to compile your own build of PHP to enable the error log.

Simon Jessey
Keystone Websites | si-blog

According to http://docs.php.net/en/errorfunc.configuration.html you should be able to set log_errors and error_log path at runtime (via .htaccess). Haven’t tried this though.

[color=#000000]DreamHost Promo Code[/color]: [color=#CC0000]Save $50[/color] with the promo code DREAMTEAM

You can enable PHP error logging by using the following line in your .htaccess file:

php_flag log_errors on The caveat is that you can only set PHP options via .htaccess if it’s running as an Apache module, not CGI. Using CGI, you may be able to use ini_set().

If you want useful replies, ask smart questions.