How not to generate PHP warnings within Apache error log

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
guarriman
Forum Commoner
Posts: 44
Joined: Thu Nov 03, 2005 4:11 am

How not to generate PHP warnings within Apache error log

Post 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.
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post 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 ?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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.
Post Reply