I'm logging PHP errors to a file on one of my sites (using a directive in an .htaccess file). Unfortunately the error messages aren't specific enough for me to track down where the user was when they occurred. I get something like
17-Oct-2005 09:13:39] PHP Fatal error: SQL in /usr/www/users/earthcor/includes/classes/table_default.class.php on line 166
Which in this case just means a bad sql query, but I don't know where.
Is there a way to write more info - the exact URL for instance?
The relevant .htaccess lines are:
php_flag display_errors off
php_flag log_errors on
php_value error_log /usr/home/earthcor/php_error_logs/phperrors.txt
I probably need to build some kind of custom error handler, right? Any tips?