|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-01-05 00:26 UTC] nlopess@php.net
[2006-01-05 02:21 UTC] nlopess@php.net
[2006-02-08 00:50 UTC] iliaa@php.net
[2006-02-08 02:23 UTC] chris at lodesys dot com
[2006-02-23 07:21 UTC] ninive at gmx dot at
[2006-03-02 22:50 UTC] piecia2000 at tlen dot pl
[2006-06-05 12:00 UTC] nlopess@php.net
[2006-06-05 23:13 UTC] nlopess@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 14:00:01 2025 UTC |
Description: ------------ This one is weird. For some value of offset & maxlen, file_get_contents will fail and crash PHP. (I'm running under Apache 1.3.34 and get a Dr. Watson). The combination may have something to do with offset + maxlen just above 4096, but even that's not consistant. Reproduce code: --------------- $x = file_get_contents("C:/php/news.txt", FALSE, NULL, 500, 3596); // WORKS $x = file_get_contents("C:/php/news.txt", FALSE, NULL, 500, 3597); // FAILS $x = file_get_contents("C:/php/news.txt", FALSE, NULL, 500, 4096); // FAILS $x = file_get_contents("C:/php/news.txt", FALSE, NULL, 500, 4097); // WORKS $x = file_get_contents("C:/php/news.txt", FALSE, NULL, 1000, 4096); // FAILS $x = file_get_contents("C:/php/news.txt", FALSE, NULL, 1000, 4097); // WORKS $x = file_get_contents("C:/php/news.txt", FALSE, NULL, 0, 4096); // WORKS $x = file_get_contents("C:/php/news.txt", FALSE, NULL, 0, 4097); // WORKS Expected result: ---------------- All combinations of offset & maxlen should work as news.txt is 74 KB long. Actual result: -------------- PHP fails in some instances (see above) with Dr. Watson reporting "Application exception occurred: App: (pid=1828)[apache.exe] Exception number: c0000005 (access violation)" Using