From:             sarvesh_borkar at yahoo dot co dot in
Operating system: FreeBSD
PHP version:      5.2.0
PHP Bug Type:     Filesystem function related
Bug description:  fopen is not opening external urls but opening local files

Description:
------------
The following code is used to fetch the news from rss and read
that news into the variable and the xml parsing and all that stuff.

This code works fine on PHP Version 4.3.11 and 
system:Linux web147.opentransfer.com 2.6.14.7 #1 Fri Sep 8 11:12:28 CDT
2006 i686

but fails on
PHP Version 5.1.6
system :FreeBSD pro29.abac.com 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #0:
Mon Nov 13 17:47:40 PST 2006 [EMAIL PROTECTED]:/var/obj/usr/src/sys/PRO6
i386




Reproduce code:
---------------
//below url is dynamic through database
$url="http://newsrss.bbc.co.uk/rss/sportonline_uk_edition/front_page/rss.xml";;


$fp=fopen($url,"rb") or die("file not opened") ;
    do {
        $data = fread($fp, 8192);
        if (strlen($data) == 0) {
        break;
      }
     $simple .= $data;
      } while(true);

    fclose($fp);

Expected result:
----------------
we expect to see the news in formatted manner which is working fine on PHP
Version 4.3.11 

Actual result:
--------------
file not opened

-- 
Edit bug report at http://bugs.php.net/?id=39841&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39841&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39841&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39841&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=39841&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=39841&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=39841&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=39841&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=39841&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=39841&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=39841&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=39841&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=39841&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=39841&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39841&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=39841&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=39841&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=39841&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39841&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=39841&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=39841&r=mysqlcfg

Reply via email to