Bug #10229 Updated: buffer error in fread
| From: | sander@php.net | Date: | Mon, 19 Nov 2001 10:43:17 +0000 |
| Subject: | Bug #10229 Updated: buffer error in fread | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-70887@lists.php.net to get a copy of this message | ||
ID: 10229
Updated by: sander
Reported By: apeeters@lashout.net
Old Status: Feedback
Status: Closed
Bug Type: Filesystem function related
Operating System: linux 2.2.14C11
PHP Version: 4.0.3pl1 4.0.4pl1 4.0.5 4.0.6
New Comment:
No feedback. Closing.
Previous Comments:
------------------------------------------------------------------------
[2001-10-29 02:41:28] sniper@php.net
Please try latest CVS snapshot from http://snaps.php.net/
as I think this should be fixed now.
--Jani
------------------------------------------------------------------------
[2001-07-06 05:09:46] apeeters@lashout.net
This error still exists, not de phpcode part, but the buffering errors, try this several times:
---start---
$fp = fopen("http://www.planetinternet.be/nl/vandaag/",
"r");
$content = fread($fp, 100000);
fclose($fp);
$fp = fopen("http://www.google.com/",
"r");
$content = fread($fp, 100000);
mail("me@host", "topic", $content);
---stop---
This is an error in the buffer handling routines and should be eliminated. It seems to occur at
_every_ request with php4.0.6 !
------------------------------------------------------------------------
[2001-04-27 15:34:42] cnewbill@php.net
I assume this is a dead issue. If not reopen.
-Chris
------------------------------------------------------------------------
[2001-04-08 05:04:10] apeeters@lashout.net
I have only seen php code once, and I was't able to reproduce it. I suppose it was a case
where php code was stored in a variable (for online editing or something). This is only a guess, as
it's not my code that I see, but code from someone else on the same server.
------------------------------------------------------------------------
[2001-04-07 20:51:58] cnewbill@php.net
I ran it through a couple hundred times and absolutely no PHP code whatsoever.
The only problem I see here is $content is never cleaned up properly and contains BOTH of the
fread()s jumbled. Which is very strange.
$fp = fopen("http://www.newsplanet.be/",
"r");
while (!feof($fp)) $content .= fread($fp, 4000);
fclose($fp);
You would be better off using the above as it works properly.
Whomever is handling the fopen-wrappers should probably look at this.
-Chris
------------------------------------------------------------------------
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/?id=10229
Edit this bug report at http://bugs.php.net/?id=10229&edit=1