ID: 50262 User updated by: daniel at rozsnyo dot com Reported By: daniel at rozsnyo dot com -Status: Feedback +Status: Closed Bug Type: Streams related Operating System: Linux PHP Version: 5.2.11 New Comment:
Thank you, the upcoming version of: /usr/bin/php -v PHP 5.2.12RC2-dev (cli) (built: Nov 22 2009 23:01:23) has a fix on this issue. Hope to see it released soon, Daniel. Previous Comments: ------------------------------------------------------------------------ [2009-11-22 16:44:33] j...@php.net Please try using this snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ [2009-11-22 10:56:37] daniel at rozsnyo dot com I have prepared two strace listings, one for 5.2.10 and one for 5.2.11. The 5.2.11 looks like the php thinks there is an immediate eof for STDIN. ------------------------------------------------------------------------ [2009-11-22 10:54:36] daniel at rozsnyo dot com Description: ------------ My postfix filter scripts written in PHP stopped working after an upgrade to php-5.2.11, the issue can be tracked down to PHP with a simplified script. Reproduce code: --------------- Create a postfix policy filter, it is enough to create a simple get and store script like this: <?php $fd = STDIN; $rq = ''; while(!feof($fd)) $rq .= fgets($fd,1024); file_put_contents('/tmp/req',$rq); ?> Expected result: ---------------- I expect the /tmp/req file to be filled with postfix's request attributes (attrib=value pairs). Actual result: -------------- With 5.2.11: The file is empty. With 5.2.10: The file is OK, filled with attributes. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50262&edit=1