|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-02-08 21:57 UTC] 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.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 29 20:00:01 2025 UTC |
1) If any of the following features is turned on in your php.ini, turn them off and try again. . output_handler=... . session.use_trans_sid=... . output_buffering=... 2) Try using file_get_contents() instead and see what'll happen. <?php echo file_get_contents('<your-cursed-win32-binary>"); ?>