#35886 [Asn->Csd]: file_get_contents() fails with some combinations of offset & maxlen
| From: | nlopess@php.net | Date: | Mon, 05 Jun 2006 23:13:51 +0000 |
| Subject: | #35886 [Asn->Csd]: file_get_contents() fails with some combinations of offset & maxlen | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-98066@lists.php.net to get a copy of this message | ||
ID: 35886
Updated by: nlopess@php.net
Reported By: chris at lodesys dot com
-Status: Assigned
+Status: Closed
Bug Type: Streams related
Operating System: win32 only
PHP Version: 5CVS-2006-01-03 (snap)
Assigned To: wez
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Edink applied the patch to PHP 5.2 and 6. Thanks!
Previous Comments:
------------------------------------------------------------------------
[2006-06-05 12:00:26] nlopess@php.net
here is the patch:
http://mega.ist.utl.pt/~ncpl/php_win_mmap_segfault.txt
------------------------------------------------------------------------
[2006-03-02 22:50:13] piecia2000 at tlen dot pl
Temporary solution (slighty slower):
$fd = fopen($filename, "rb");
fseek($fd, $offset);
$file = fread($fd, $size);
fclose($fd);
please fix file_get_contents(),
------------------------------------------------------------------------
[2006-02-23 07:21:30] ninive at gmx dot at
Please fix this critical bug.
------------------------------------------------------------------------
[2006-02-08 02:23:46] chris at lodesys dot com
The example test file is C:/php/news.txt (part of the PHP Windows
distribution). It is 74 KB (75,800 bytes). Was having problems with
files larger than that (say up to 170 KB). Didn't test with extra
large files.
------------------------------------------------------------------------
[2006-02-08 00:50:26] iliaa@php.net
How big is the file?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/35886
--
Edit this bug report at http://bugs.php.net/?id=35886&edit=1