#23910 [Opn->Bgs]: opening a URL with fopen gives different results than in 4.3.1
| From: | wez@php.net | Date: | Fri, 30 May 2003 21:57:18 +0000 |
| Subject: | #23910 [Opn->Bgs]: opening a URL with fopen gives different results than in 4.3.1 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-40755@lists.php.net to get a copy of this message | ||
ID: 23910
Updated by: wez@php.net
Reported By: nmcfaul at mcfaulgolf dot com
-Status: Open
+Status: Bogus
Bug Type: Filesystem function related
Operating System: Linux 2.4.20
PHP Version: 4.3.2
New Comment:
4.3.0 and 4.3.1 were actually broken in allowing your script to work in
the way that it did.
4.3.2 re-introduces the correct behaviour from 4.2.x days and earlier.
We updated the online manual today to reflect this; please read this:
http://www.php.net/manual/en/function.fread.php
This is expected behaviour, so I'm marking this report as bogus (as it
is not a bug).
Previous Comments:
------------------------------------------------------------------------
[2003-05-30 16:24:59] nmcfaul at mcfaulgolf dot com
I'm having trouble figuring out why when I use fopen to open a URL in
4.3.2 I get different output than in 4.3.1.
I'm using the following to get sport scores from sportline.com, i also
put in some troubleshooting code to help me determine the problem.
$url = "http://www.sportsline.com/mlb/box-scoreboards";
$fp=fopen($url,"rb") or die ("<p>Could not Open
Sportsline.com</p>");
$handle = fopen("/opt/web/sportsline.txt","a");
$file=fread($fp,600000);
$new=substr($file,0);
fwrite($handle,$new);
fclose($handle);
fclose($fp);
When I run the above script in 4.3.2 I get a filesize of 2434 bytes,
when I run the exact same code in 4.3.1, I get a filesize of 10733
bytes.
I've used the exact same configure script parameters for both PHP
builds, and the same apache version (2.0.46)
Any assistance would be appreciated!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23910&edit=1