#23910 [NEW]: opening a URL with fopen gives different results than in 4.3.1
| From: | nmcfaul at mcfaulgolf dot com | Date: | Fri, 30 May 2003 21:24:59 +0000 |
| Subject: | #23910 [NEW]: opening a URL with fopen gives different results than in 4.3.1 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-40751@lists.php.net to get a copy of this message | ||
From: nmcfaul at mcfaulgolf dot com
Operating system: Linux 2.4.20
PHP version: 4.3.2
PHP Bug Type: Filesystem function related
Bug description: opening a URL with fopen gives different results than in 4.3.1
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 bug report at http://bugs.php.net/?id=23910&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23910&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23910&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23910&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23910&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23910&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23910&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23910&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23910&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23910&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23910&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23910&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23910&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23910&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23910&r=gnused