[PHP] Error logging
We have the following php.ini settings: error_reporting = E_ALL display_errors = Off display_startup_errors = Off log_errors = On log_errors_max_len = 1024 ignore_repeated_errors = Off ignore_repeated_source = Off report_memleaks = On track_errors = Off on a SuSE 10.1 server and the errors are being logged to /var/log/apache2/error_log (although I can't seem to find a setting that is making that happen.) parse errors ARE being logged to this file and that would be extremely useful information for students to be able to have when trying to find problems in their scripts. I can't just make that file readable to them. So, I had students create a "logs" directory within their file area and set the permissions so that the server can to it. I have them adding the following to the script(s) that they wish to troubleshoot: ini_set("log_errors", "On"); ini_set("error_reporting", E_ALL); ini_set("error_log", "logs/error_log"); Parse errors are not being written to their personal log file, though. Why not?? About the only going in there are NOTICE level entries. Thanks. Clark W. Alexander -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error logging
Yes, it does write to the file, but the only things going in there are notice type entries. Also, for further information, it is php 5.1.2 using the Suse rpm. On 5/31/07 5:14 PM, in article [EMAIL PROTECTED], "Jochem Maas" <[EMAIL PROTECTED]> wrote: > Clark Alexander wrote: >> We have the following php.ini settings: >> error_reporting = E_ALL >> display_errors = Off >> display_startup_errors = Off >> log_errors = On >> log_errors_max_len = 1024 >> ignore_repeated_errors = Off >> ignore_repeated_source = Off >> report_memleaks = On >> track_errors = Off >> >> on a SuSE 10.1 server and the errors are being logged to >> /var/log/apache2/error_log >> (although I can't seem to find a setting that is making that happen.) >> >> parse errors ARE being logged to this file and that would be extremely >> useful information for students to be able to have when trying to find >> problems in their scripts. I can't just make that file readable to them. >> >> So, I had students create a "logs" directory within their file area and set >> the permissions so that the server can to it. I have them adding the >> following to the script(s) that they wish to troubleshoot: >> >> ini_set("log_errors", "On"); >> ini_set("error_reporting", E_ALL); >> ini_set("error_log", "logs/error_log"); >> >> >> Parse errors are not being written to their personal log file, though. Why >> not?? About the only going in there are NOTICE level entries. > > does log/error_log exist? > does the webserver have write permissions on that file? > >> >> Thanks. >> >> Clark W. Alexander >> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error logging
Upon review, I also discover that fatal error entries are being made as well. On 5/31/07 5:14 PM, in article [EMAIL PROTECTED], "Jochem Maas" <[EMAIL PROTECTED]> wrote: > Clark Alexander wrote: >> We have the following php.ini settings: >> error_reporting = E_ALL >> display_errors = Off >> display_startup_errors = Off >> log_errors = On >> log_errors_max_len = 1024 >> ignore_repeated_errors = Off >> ignore_repeated_source = Off >> report_memleaks = On >> track_errors = Off >> >> on a SuSE 10.1 server and the errors are being logged to >> /var/log/apache2/error_log >> (although I can't seem to find a setting that is making that happen.) >> >> parse errors ARE being logged to this file and that would be extremely >> useful information for students to be able to have when trying to find >> problems in their scripts. I can't just make that file readable to them. >> >> So, I had students create a "logs" directory within their file area and set >> the permissions so that the server can to it. I have them adding the >> following to the script(s) that they wish to troubleshoot: >> >> ini_set("log_errors", "On"); >> ini_set("error_reporting", E_ALL); >> ini_set("error_log", "logs/error_log"); >> >> >> Parse errors are not being written to their personal log file, though. Why >> not?? About the only going in there are NOTICE level entries. > > does log/error_log exist? > does the webserver have write permissions on that file? > >> >> Thanks. >> >> Clark W. Alexander >> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php