php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62660 PHP error logging with FPM fails to display an IP address and correct time
Submitted: 2012-07-25 14:40 UTC Modified: 2017-04-12 18:14 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: joe at cirkuit dot net Assigned: bukka (profile)
Status: Assigned Package: FPM related
PHP Version: 5.3.15 OS: FreeBSD 8.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: joe at cirkuit dot net
New email:
PHP Version: OS:

 

 [2012-07-25 14:40 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-10 19:00 UTC] bukka@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: bukka
 [2017-04-12 18:14 UTC] 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?
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Jun 16 22:01:28 2019 UTC