Myspace Layouts - Find jobs - Find jobs - Wp themes - Kamala Harris

PDA

View Full Version : error_log: additional informations?


flip79
Jun 19th 2009, 1:00 pm
Hello,

(sorry for my english)

I'm trying to configure my server to log every error that is triggered by php, so I activated:

log_errors = On
error_log = /var/log/php/php_errors.log

Now errors from every site that is running on apache logs its php errors on that file. Unfortunately, I find this log not very useful, because it reports the name of the script that caused the error, but without the query string, or the post data, so I often can't determine and recreate the situation, to fix it.

Is there a way to make php log more informations about the errors, for example the full URL?

Thank you in advance!

livedatesearch
Jun 23rd 2009, 2:22 am
As far as I know it is not possible using PHP.ini config.

But you can define your own error handler function in PHP:

mixed set_error_handler ( callback $error_handler [, int $error_types= E_ALL | E_STRICT ] )

which logs error and REQUEST_URI or any other data (user_id, etc) as well.

Купить дом/коттедж в Вышгородском районе (http://www.dom2000.com.ua/kiev_kupit_dom_vyshgorodkiy_rayon.php) Купить землю/участок в Обуховском районе (http://www.dom2000.com.ua/kiev_kupit_zemlu_obukhovskiy_rayon.php) Продать землю/участок в Обуховском районе (http://www.dom2000.com.ua/kiev_prodat_zemlu_obukhovskiy_rayon.php) Купить землю/участок в Бориспольском районе (http://www.dom2000.com.ua/kiev_kupit_zemlu_boriskoplskiy_rayon.php)