#50262 [NEW]: stdin behavior changed between 5.2.10 and 5.2.11
| From: | daniel at rozsnyo dot com | Date: | Sun, 22 Nov 2009 10:54:36 +0000 |
| Subject: | #50262 [NEW]: stdin behavior changed between 5.2.10 and 5.2.11 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-144924@lists.php.net to get a copy of this message | ||
From: daniel at rozsnyo dot com
Operating system: Linux
PHP version: 5.2.11
PHP Bug Type: Streams related
Bug description: stdin behavior changed between 5.2.10 and 5.2.11
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 bug report at http://bugs.php.net/?id=50262&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50262&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50262&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50262&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=50262&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50262&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=50262&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=50262&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=50262&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=50262&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=50262&r=support
Expected behavior: http://bugs.php.net/fix.php?id=50262&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=50262&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=50262&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=50262&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50262&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=50262&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=50262&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=50262&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=50262&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=50262&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=50262&r=mysqlcfg