|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79372 php-cli 7.4.3 does not send exception message to stderr
Submitted: 2020-03-12 12:27 UTC Modified: 2020-03-12 13:56 UTC
From: divinity76 at gmail dot com Assigned: googleguy (profile)
Status: Not a bug Package: Output Control
PHP Version: 7.4.3 OS: Amazon Linux 2, kernel 4.14.128
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: divinity76 at gmail dot com
New email:
PHP Version: OS:


 [2020-03-12 12:27 UTC] divinity76 at gmail dot com
7.4.3 does not send uncaught exception messages to stderr,

observed with PHP 7.4.3 built from php-7.4.3.tar.xz with the command

./configure --enable-mbstring --with-curl --with-openssl --with-mysqli --with-zlib --with-pdo-mysql --with-pdo-sqlite

on Amazon Linux 2.

Test script:
php -r 'ini_set("display_errors","0");error_reporting(E_ALL);throw new Exception();' >1 2>2; du --apparent-size --bytes 1 2

Expected result:
0       1
123     2

Actual result:
0	1
0	2


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-03-12 12:29 UTC]
-Assigned To: +Assigned To: googleguy
 [2020-03-12 13:14 UTC]
-Status: Assigned +Status: Not a bug
 [2020-03-12 13:14 UTC]
Nothing change in this regard in PHP 7.4, you did not enable log_errors=1.
 [2020-03-12 13:51 UTC]
Do you know if the default value of log_errors has changed in 7.4? I can confirm that turning on log_errors does show the error. Just curious.
 [2020-03-12 13:53 UTC]
@googleguy: No, it did not change. The -n configuration always has display_errors=1 and log_errors=0. OP is probably comparing with a setup that uses php.ini-production or similar.
 [2020-03-12 13:56 UTC]
@nikic OK, got it. Thanks for the tip.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 22 16:01:29 2024 UTC