|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #29063 no error is logged if php error_log could not be opened
Submitted: 2004-07-08 12:58 UTC Modified: 2022-04-08 07:29 UTC
Avg. Score:3.3 ± 1.7
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: akorthaus at web dot de Assigned: ilutov (profile)
Status: Closed Package: *General Issues
PHP Version: * OS: Irrelevant
Private report: No CVE-ID: None
 [2004-07-08 12:58 UTC] akorthaus at web dot de
I have the following settings in + phpinfo():

log_errors = On
error_log = "/var/log/apache/php_error.log"

Server API: Apache (mod_php)
Apache-Version: 1.3.31

But if I produce a php-error, this error gets logged into Apache error-log: /var/log/apache/error_log, and not into /var/log/apache/php_error.log, as configured. 

The reason was that mod_php not like mod_gzip and mod_ssl, loggs errors with rights of the apache child-process.  

The Apache user cannot create files in /var/log/apache, and cannot write to files owned by root. 

But there is no error-message in Apaches error_log, I would expect something like "could not open '/var/log/apache/php_error.log', permission denied". Only php-errors itself get logged into Apaches error_log. 

perhaps its a "feature request". 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-08 23:06 UTC]
-Package: Feature/Change Request +Package: *General Issues -Operating System: Linux 2.4.26 +Operating System: Irrelevant -PHP Version: 4.3.7 +PHP Version: *
 [2015-01-08 23:06 UTC]
Not sure if this is still broken, but I'll bump the version anyway.
 [2022-04-08 07:29 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: ilutov
 [2022-04-08 07:29 UTC]
This issue is very old, if this is still a problem please create a new issue on GitHub.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 25 07:01:30 2024 UTC