Skip to content

PHP 8.5 FPM access log lines also go to STDERR #19989

Closed

Description

@rainerjung

Description

We tested PHP 8.5 and noticed a change between alpha2 and beta2, which still exists in RC1: all lines going to a configured access log file in FPM also seems to get send to Apache as errors, so probably they are somehow also written to STDERR.

Example:

  • custom FPM access log line:
::1 -  29/Sep/2025:11:52:53 +0200 "GET /status?json&full" 200 - 0.710 2048 0.00%
  • unexpected line in Apache httpd error log file:
:1 -  29/Sep/2025:11:52:53 +0200 "GET /status?json&full" 200 - 0.710 2048 0.00%', referer http://myserver/status.html

Looking at FPM changes, this is likely due to the fix for issue #12302 in PR #18725 (Commit cfb3e98).

PHP Version

PHP 8.5.0RC1 (cli) (built: Sep 28 2025 09:40:27) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.5.0RC1, Copyright (c) Zend Technologies
    with Zend OPcache v8.5.0RC1, Copyright (c), by Zend Technologies

Operating System

Linux RHEL 9

Activity

  1. Victor-D commented on Oct 3, 2025

    @Victor-D

    Hello

    We also detected the same issue in zlog_stream_init_internal() with PHP 8.5.0 RC1 on Debian systems running php-fpm with access logs direct writing (no syslog).

    Access logs are written in the php-fpm access log file, but also in the stderr, resulting being written in the Apache error logs.

    This is a blocker for production release because it will generate too much logs :(

  2. added a commit that references this issue on Oct 10, 2025
    94a2135
  3. bukka commented on Oct 10, 2025

    @bukka
    Member

    I can confirm that this is a bug. Fix in #20123 .

  4. added a commit that references this issue on Oct 10, 2025
    234577e
  5. added a commit that references this issue on Oct 10, 2025
    12b16c6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions