ID: 50262
User updated by: daniel at rozsnyo dot com
Reported By: daniel at rozsnyo dot com
Status: Open
Bug Type: Streams related
Operating System: Linux
PHP Version: 5.2.11
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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