Page 1 of 1
How not to generate PHP warnings within Apache error log
Posted: Wed Mar 07, 2007 6:55 am
by guarriman
Hi.
Using Apache 2.0.52 with PHP 4.3.10 on Linux, I'd like not to include PHP warnings within the Apache error log.
Within 'php.ini' I set "log_errors = Off", but my Apache error log is still including these erorrs.
Any suggestion? Thank you very much.
Posted: Wed Mar 07, 2007 7:50 am
by anjanesh
Normally log_errors is set to true if you're logging the errors in your own file.
Code: Select all
ini_set("log_errors" , "1");
ini_set("error_log" , "errors.log");
Is there an option to control apache logs ?
Posted: Wed Mar 07, 2007 8:11 am
by volka
anjanesh wrote:Is there an option to control apache logs ?
You already solved it
http://de2.php.net/manual/en/ref.errorfunc.php#ini.error-log wrote: error_log string
Name of the file where script errors should be logged. The file should be writable by the web server's user. If the special value syslog is used, the errors are sent to the system logger instead. On Unix, this means syslog(3) and on Windows NT it means the event log. The system logger is not supported on Windows 95. See also: syslog().
If this directive is not set, errors are sent to the SAPI error logger. For example, it is an error log in Apache or stderr in CLI.