Bug #79166 [Opn->Ver]: PHP 7.4 error with php://stderr

From: Date: Sun, 26 Jan 2020 16:14:56 +0000
Subject: Bug #79166 [Opn->Ver]: PHP 7.4 error with php://stderr
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-225121@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79166&edit=1

 ID:                 79166
 Updated by:         cmb@php.net
 Reported by:        michael dot piche at csrt dot ulaval dot ca
 Summary:            PHP 7.4 error with php://stderr
-Status:             Open
+Status:             Verified
 Type:               Bug
-Package:            *Directory/Filesystem functions
+Package:            Streams related
 Operating System:   Windows
 PHP Version:        7.4.2
 Block user comment: N
 Private report:     N

 New Comment:

I can confirm that behavior for FastCGI/IIS.


Previous Comments:
------------------------------------------------------------------------
[2020-01-24 13:42:47] michael dot piche at csrt dot ulaval dot ca

Description:
------------
Since PHP 7.4, the stream php://stderr is giving me a PHP notice "Bad file descriptor".
Everything is working fine with PHP 7.3. 

I'm on Windows using mod_fcgid. The notice isn't happening if I run my script directly
from the command line.

I've got the same error with php://stdout


Test script:
---------------
$fp = fopen('php://stderr', 'w+');
var_dump($fp);
fwrite($fp, "test\n");

Actual result:
--------------
resource(3) of type (stream) 

Notice: fwrite(): write of 5 bytes failed with errno=9 Bad file descriptor in
D:\htdocs\test_code\74.php on line 7


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



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


Thread (5 messages)

« previous php.bugs (#225121) next »