php.net |  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
 [2020-03-12 12:27 UTC] divinity76 at gmail dot com
Description:
------------
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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-03-12 12:29 UTC] googleguy@php.net
-Assigned To: +Assigned To: googleguy
 [2020-03-12 13:14 UTC] nikic@php.net
-Status: Assigned +Status: Not a bug
 [2020-03-12 13:14 UTC] nikic@php.net
Nothing change in this regard in PHP 7.4, you did not enable log_errors=1.
 [2020-03-12 13:51 UTC] googleguy@php.net
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] nikic@php.net
@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] googleguy@php.net
@nikic OK, got it. Thanks for the tip.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 14:01:30 2024 UTC