Bug #66854 [Fbk->Opn]: STDERR and STDIN are undefined in CLI SAPI

From: Date: Thu, 20 Mar 2014 11:14:24 +0000
Subject: Bug #66854 [Fbk->Opn]: STDERR and STDIN are undefined in CLI SAPI
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184840@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66854&edit=1 ID: 66854 User updated by: martin dot koranda at gmail dot com Reported by: martin dot koranda at gmail dot com Summary: STDERR and STDIN are undefined in CLI SAPI -Status: Feedback +Status: Open Type: Bug Package: Built-in web server Operating System: windows PHP Version: Irrelevant Block user comment: N Private report: N New Comment: <?php echo STDERR; echo STDIN; --------------- run this via CLI SAPI like php -S localhost:8080 and the output is: Notice: Use of undefined constant STDIN - assumed 'STDIN' Notice: Use of undefined constant STDERR - assumed 'STDERR' seems that it does not affect those who have Readline/Libedit compiled with php Previous Comments: ------------------------------------------------------------------------ [2014-03-11 09:57:57] ab@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. php -n -r "var_dump(STDIN, STDERR);" resource(1) of type (stream) resource(3) of type (stream) Please post some reproduce way. Thanks. ------------------------------------------------------------------------ [2014-03-08 15:39:45] martin dot koranda at gmail dot com Description: ------------ For some reason, the CLI SAPI doesn't define STDERR and STDIN constants, even though 'php://stderr' and 'php://stdin' still work like you'd expect. This only affected people without Readline or Libedit. php 5.5.10 on windows8x64 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=66854&edit=1

« previous php.bugs (#184840) next »