php.net |  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: 2015-01-08 23:06 UTC
Votes:2
Avg. Score:2.5 ± 1.5
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: akorthaus at web dot de Assigned:
Status: Open Package: *General Issues
PHP Version: * OS: Irrelevant
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: akorthaus at web dot de
New email:
PHP Version: OS:

 

 [2004-07-08 12:58 UTC] akorthaus at web dot de
Description:
------------
I have the following settings in php.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". 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-08 23:06 UTC] ajf@php.net
-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] ajf@php.net
Not sure if this is still broken, but I'll bump the version anyway.
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC