From: php at brokep dot com Operating system: Tru64 v5.0a PHP version: 5.0.0b3 (beta3) PHP Bug Type: Filesystem function related Bug description: fpassthru seems to not be binary safe
Description: ------------ While trying this code, my webpage was outputted as empty: $fp=fopen("windowsfile.exe", "rb"); fpassthru($fp); If I instead used echo the data i fread() it was no problem. I tried fpassthru() with ELF-binaries and this was not a problem, only with the windows-binary file. Reproduce code: --------------- $client="/a/win32/binary/file.exe"; $fs=filesize($client); $fp=fopen($client,"rb"); fpassthru($fp); Expected result: ---------------- the contents of the $client-file Actual result: -------------- An empty webpage. -- Edit bug report at http://bugs.php.net/?id=27187&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27187&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27187&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27187&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27187&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27187&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27187&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27187&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27187&r=support Expected behavior: http://bugs.php.net/fix.php?id=27187&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27187&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27187&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27187&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27187&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27187&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27187&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27187&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27187&r=float