|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-03-06 07:07 UTC] patrick at borgeat dot de
[2004-03-06 14:11 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 28 09:00:01 2025 UTC |
Description: ------------ As I mistakenly tried to read a very large number of bytes (1078508183) (more than are in the file) with fread, the Site doesn't react anymore and i get a apache.exe Task in my Tasklist consuming an average of 80% CPU Load (with a 1300 Mhz Machine) which can't be stopped (maybe also due to missing rights). Also the file is blocked. Never tested this on Linux, but I think if a server does this mistakenly several times at once the whole server enviroment would crash. I run Apache 2.0.48 with PHP 5.0.0b4 as Apache2 Handler on Windows 2000 SR4 on FAT32 Filesystem. Reproduce code: --------------- (in my case test was a textfile with the 3 Letters "AAA") <? $fp = fopen("test",r"); $res = fread($fp,1078508183); echo $res fclose($fp); ?> Expected result: ---------------- I expected PHP to be as smart (as it is with smaller numbers for example like 50 000) to write only 3 Bytes and output "AAA". Actual result: -------------- Apache Task isn't stopable and runs @ Average of 80% CPU Load