Cant enable PHP error logging


#1

Hello there, im having a foo trying to enable the error logging features on my php install.

I have tried the following, without success:

  1. I added the following lines to my .htaccess file:

php_flag display_errors on php_value error_reporting E_ALL php_flag log_errors on php_value error_log /home/diegomax/domain.com/php_log and it doesnt works. I have also added the proper directives in the php.ini file for my cgi php install, same thing, logs are never recorded.

Does anybody knows what im doing wrong ? I have a php script that is not working, and i really need to see whats going on in order to debug it.
Thanks in advance.
Diego.

Take Care, Diego.
http://massanti.com


#2

Giving this somewhat aged thread a bump as I’m not having any luck either. Is there a trick to this I’m missing? I can’t find anything relating to error_log in the Wiki.


#3

Did you try to compile your own php.ini file?


#4

No, I didn’t. Apologies, didn’t search the Wiki well enough. I followed these steps:

http://www.wiki.dreamhost.com/index.php/PHP.ini#Custom_php.ini_for_a_Single_domain

And changed these params:
log_errors = On
error_log = /home/username/example.com/log/error_log.txt

Works a treat!

Thanks.


#5

I am glad that you have it working :slight_smile: