|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2019-02-22 08:17 UTC] claudiu_beta at yahoo dot com
 Description: ------------ Starting with my first tested php 7.3 version and including the latest 7.3.3RC1, I have this in master php-fpm log: [21-Feb-2019 14:33:59] WARNING: [pool name] child 23221 said into stderr: "^@" Operator displayed instead of proper error message. In any previous php version the message is displayed correctly. e.g. [21-Feb-2019 20:24:14] WARNING: [pool name] child 2491 said into stderr: "ERROR: Unable to open primary script: ....." PatchesPull Requests
Pull requests: 
 HistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 18:00:01 2025 UTC | 
@bukka: Probably not *quite* what is happening here, but likely related: You are calling fpm_stdio_flush_child() as part of fpm_request_end(), which is run before php_request_shutdown(). This means that the finalizing NUL is written, but there may still be output to stderr afterwards due to shutdown functions and destructors. Here is a test case, basically log-bm-limit-1024-msg-80.phpt wrapped in a register_shutdown_function(): --TEST-- FPM: Log message in shutdown function --SKIPIF-- <?php include "skipif.inc"; ?> --FILE-- <?php require_once "tester.inc"; $cfg = <<<EOT [global] error_log = {{FILE:LOG}} log_limit = 1024 log_buffering = yes [unconfined] listen = {{ADDR}} pm = dynamic pm.max_children = 5 pm.start_servers = 1 pm.min_spare_servers = 1 pm.max_spare_servers = 3 catch_workers_output = yes EOT; $code = <<<EOT <?php register_shutdown_function(function() { error_log(str_repeat('e', 80)); }); EOT; $tester = new FPM\Tester($cfg, $code); $tester->start(); $tester->expectLogStartNotices(); $tester->request()->expectEmptyBody(); $tester->terminate(); $tester->expectFastCGIErrorMessage('e', 1050, 80); $tester->expectLogMessage('NOTICE: PHP message: ' . str_repeat('e', 80), 1050); $tester->close(); ?> Done --EXPECT-- Done --CLEAN-- <?php require_once "tester.inc"; FPM\Tester::clean(); ?> It produces this diff: ERROR: The actual string(102) does not match expected string(101): - EXPECT: 'NOTICE: PHP message: eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee' - ACTUAL: '^@NOTICE: PHP message: eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee' Done I don't really understand what the purpose of the fpm_stdio_flush_child() is (why is an explicit NUL necessary, rather than just a closed stream?) but at least the current place where it is called isn't right.