note 97043 added to function.error-log
| From: | ScottR at osu1 dot php dot net | Date: | Mon, 29 Mar 2010 21:05:44 +0000 |
| Subject: | note 97043 added to function.error-log | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-167508@lists.php.net to get a copy of this message | ||
When starting Apache from a user context other than Apache's runtime user, the error log file
(if one is specified) may be created under the starting user if it did not previously exist.
For example, I had specified the incorrect filename for my browscap.ini file, and would only see
this error in the log file upon each restart of Apache. Because of this, I assumed I'd
configured logging correctly:
[24-Feb-2010 12:33:04] PHP Warning: Cannot open '/etc/php5/apache/lite_php_browscap.ini'
for reading in Unknown on line 0
No other errors would log at runtime even though I had originally set the owner of the log directory
to www-data (Apache runs under this user context). My file (error.log) was being created with the
owner = root, because I had restarted the apache2 service as root after configuring the log file
location. (I made the poor assumption that since PHP/Apache had created the file it was created by
www-data, so I hadn't looked).
Changing owner of the log file to the correct user (i.e. www-data) fixed the problem.
----
Server IP: 69.147.83.197
Probable Submitter: 96.57.46.130
----
Manual Page -- http://www.php.net/manual/en/function.error-log.php
Edit -- https://master.php.net/note/edit/97043
Del: integrated -- https://master.php.net/note/delete/97043/integrated
Del: useless -- https://master.php.net/note/delete/97043/useless
Del: bad code -- https://master.php.net/note/delete/97043/bad+code
Del: spam -- https://master.php.net/note/delete/97043/spam
Del: non-english -- https://master.php.net/note/delete/97043/non-english
Del: in docs -- https://master.php.net/note/delete/97043/in+docs
Del: other reasons-- https://master.php.net/note/delete/97043
Reject -- https://master.php.net/note/reject/97043
Search -- https://master.php.net/manage/user-notes.php