#27187 [Opn->Fbk]: fpassthru seems to not be binary safe

From: Date: Mon, 09 Feb 2004 03:21:25 +0000
Subject: #27187 [Opn->Fbk]: fpassthru seems to not be binary safe
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-54590@lists.php.net to get a copy of this message
ID: 27187 Updated by: moriyoshi@php.net Reported By: php at brokep dot com -Status: Open +Status: Feedback Bug Type: Filesystem function related Operating System: Tru64 v5.0a PHP Version: 5.0.0b3 (beta3) New Comment: Which web server implementation are you using? (eg. Apache) and what is the version of it? (eg. 2.0.40) And could you try it on the CLI version of PHP again? Previous Comments: ------------------------------------------------------------------------ [2004-02-08 21:57:05] php at brokep dot com 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 this bug report at http://bugs.php.net/?id=27187&edit=1

« previous php.bugs (#54590) next »