note 47832 added to function.fread

From: Date: Wed, 01 Dec 2004 22:23:01 +0000
Subject: note 47832 added to function.fread
Groups: php.notes 
Request: Send a blank email to php-notes+get-81255@lists.php.net to get a copy of this message
If, like me, you're in the habit of using fopen("http://...") and fread for pulling fairly large remote files, you may find that the upgrade to PHP5 (5.0.2 on Win2000/IIS5) causes fread to top out at about 8035 bytes. PHP5 RC2 with identical php.ini settings did not exhibit this behaviour (I was using this for testing). Irritating for me because I was using simple_xml_load to load the file contents as XML, and the problem initially appeared to be that function. Solution - swap over to file_get_contents or use the loop suggested on the documentation above (see Warning). ---- Manual Page -- http://www.php.net/manual/en/function.fread.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+47832 Delete -- http://master.php.net/manage/user-notes.php?action=delete+47832&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47832&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47832&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47832&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47832&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47832&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+47832&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#81255) next »