Bug #79372 [Nab]: php-cli 7.4.3 does not send exception message to stderr

From: Date: Thu, 12 Mar 2020 13:56:25 +0000
Subject: Bug #79372 [Nab]: php-cli 7.4.3 does not send exception message to stderr
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-226065@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79372&edit=1

 ID:                 79372
 Updated by:         googleguy@php.net
 Reported by:        divinity76 at gmail dot com
 Summary:            php-cli 7.4.3 does not send exception message to
                     stderr
 Status:             Not a bug
 Type:               Bug
 Package:            Output Control
 Operating System:   Amazon Linux 2, kernel 4.14.128
 PHP Version:        7.4.3
 Assigned To:        googleguy
 Block user comment: N
 Private report:     N

 New Comment:

@nikic OK, got it. Thanks for the tip.


Previous Comments:
------------------------------------------------------------------------
[2020-03-12 13:53:57] 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:51:58] 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:14:46] nikic@php.net

Nothing change in this regard in PHP 7.4, you did not enable log_errors=1.

------------------------------------------------------------------------
[2020-03-12 12:27:27] 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


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=79372&edit=1


Thread (5 messages)

« previous php.bugs (#226065) next »