Bug #62660 [Com]: PHP error logging with FPM fails to display an IP address and correct time
| From: | joe at manvscode dot com | Date: | Wed, 28 Aug 2019 16:22:23 +0000 |
| Subject: | Bug #62660 [Com]: PHP error logging with FPM fails to display an IP address and correct time | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-222474@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62660&edit=1
ID: 62660
Comment by: joe at manvscode dot com
Reported by: joe at cirkuit dot net
Summary: PHP error logging with FPM fails to display an IP
address and correct time
Status: Assigned
Type: Bug
Package: FPM related
Operating System: FreeBSD 8.1
PHP Version: 5.3.15
Assigned To: bukka
Block user comment: N
Private report: N
New Comment:
YES!!!!!!!!!!! 7 YEARS LATER
Previous Comments:
------------------------------------------------------------------------
[2017-04-12 18:14:08] bukka@php.net
Is this still an issue?
If so I'm not sure if this has anything to do with FPM as you point to the Apache error log
unless you set FPM error_log to that location? Please could you post your fpm config?
------------------------------------------------------------------------
[2012-07-25 14:40:28] joe at cirkuit dot net
Description:
------------
This only happens under a specific condition. If the error_log file being written
to is world readable/writable (didn't test other cases), then any php
errors/warnings/notices that are logged have no IP address and have a UTC
timestamp.
Changing permissions from 777 to 644 resolves this issue.
I know the error log should probably never be world writable, but it's strange how
strengthening the permissions caused the IP and correct timestamp log correctly.
Test script:
---------------
chmod 777 /usr/local/apache/logs/error_log
[create any php script that produces an error or notice]
[run the php script via www (using fastcgi, not sure if this matters)]
tail /usr/local/apache/logs/error_log
fixed when:
chmod 644 /usr/local/apache/logs/error_log
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62660&edit=1