|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-07-16 01:15 UTC] asyka at kimo dot com dot tw
I have found a bug on page function.fread.html [chm date: 2002-04-20]... in php 4.2.1 fread function sometime may crash php (show can't read 0x000... memory address) what's wrong? PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 09:00:02 2025 UTC |
for example:(abc.exe is execution file) $fp=fopen("abc.exe","rb"); $exe_get=fread($fp,filesize("abc.exe"));I got a similar problem with file which containt 1A (hexa) but no crash the fread only skip the 1A ... on Win NT with Apache/1.3.27 (Win32) PHP/4.2.3 I have the same probleme with : Apache/1.3.27 (Win32) PHP/4.4.0-dev for example a 7437824 bytes files become a 7.437.722 Bytes files here is the code I use : $file1 = @fopen($localfile, "rb"); $file2 = @fopen($destfile, "w"); while (!feof($fp)) { fwrite($file2,fread($file1, filesize($localfile))); }