note 52307 added to function.readfile
| From: | erik at eldata dot se | Date: | Wed, 27 Apr 2005 14:32:19 +0000 |
| Subject: | note 52307 added to function.readfile | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-88634@lists.php.net to get a copy of this message | ||
5.0.4 gotcha - for some reason when upgrading from 5.0.3 to 5.0.4 the readfile call stopped reading
after 2000000 bytes. Using readfile_chunked solves this. Why I don't know...?
Looking at the code for readfile that calls php_stream_passthru for the real work it checks to
perform an mmap call to map the entire file into memory. If mmap isn't supported it falls back
to a loop using a 8192 byte buffer. Has something been changed relating to mmap?
My resource limits are set high and should not be the cause:
max_execution_time = 60
max_input_time = 60
memory_limit = 256M
Is there a difference or new limit imposed, related to mmap...?!?
----
Manual Page -- http://www.php.net/manual/en/function.readfile.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+52307
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52307&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52307&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52307&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52307&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52307&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+52307&report=yes
Search -- http://master.php.net/manage/user-notes.php