#39841 [NEW]: fopen is not opening external urls but opening local files

Ask a Question related to PHP Programming, Design and Development.

  1. #1

    Default #39841 [NEW]: fopen is not opening external urls but opening local files

    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]root@bak5.abac.com[/email]:/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 [url]http://bugs.php.net/?id=39841&edit=1[/url]
    --
    Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=39841&r=trysnapshot44[/url]
    Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=39841&r=trysnapshot52[/url]
    Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=39841&r=trysnapshot60[/url]
    Fixed in CVS: [url]http://bugs.php.net/fix.php?id=39841&r=fixedcvs[/url]
    Fixed in release: [url]http://bugs.php.net/fix.php?id=39841&r=alreadyfixed[/url]
    Need backtrace: [url]http://bugs.php.net/fix.php?id=39841&r=needtrace[/url]
    Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=39841&r=needscript[/url]
    Try newer version: [url]http://bugs.php.net/fix.php?id=39841&r=oldversion[/url]
    Not developer issue: [url]http://bugs.php.net/fix.php?id=39841&r=support[/url]
    Expected behavior: [url]http://bugs.php.net/fix.php?id=39841&r=notwrong[/url]
    Not enough info: [url]http://bugs.php.net/fix.php?id=39841&r=notenoughinfo[/url]
    Submitted twice: [url]http://bugs.php.net/fix.php?id=39841&r=submittedtwice[/url]
    register_globals: [url]http://bugs.php.net/fix.php?id=39841&r=globals[/url]
    PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=39841&r=php3[/url]
    Daylight Savings: [url]http://bugs.php.net/fix.php?id=39841&r=dst[/url]
    IIS Stability: [url]http://bugs.php.net/fix.php?id=39841&r=isapi[/url]
    Install GNU Sed: [url]http://bugs.php.net/fix.php?id=39841&r=gnused[/url]
    Floating point limitations: [url]http://bugs.php.net/fix.php?id=39841&r=float[/url]
    No Zend Extensions: [url]http://bugs.php.net/fix.php?id=39841&r=nozend[/url]
    MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=39841&r=mysqlcfg[/url]
    sarvesh_borkar at yahoo dot co dot in Guest

  2. Similar Questions and Discussions

    1. Opening URLs in a New window...(with a twist)
      Hello...i have a URL problem myself. I have a movie published and embeded in dreamweaver...and i have a links page in the flash movie that gets...
    2. opening external Files
      Hi, How can I open some "Word" documents from my director File? I'm trying to use the FileXtra3 commands but- they don't allways work (I think...
    3. #25619 [Opn->Fbk]: fopen crashes while opening redirected pages
      ID: 25619 Updated by: rasmus@php.net Reported By: info at kktcbul dot com -Status: Open +Status: ...
    4. #25619 [NEW]: fopen crashes while opening redirected pages
      From: info at kktcbul dot com Operating system: windows xp PHP version: 4.3.1 PHP Bug Type: Filesystem function related Bug...
  3. #2

    Default #39841 [Opn]: fopen is not opening external urls but opening local files

    ID: 39841
    User updated by: sarvesh_borkar at yahoo dot co dot in
    Reported By: sarvesh_borkar at yahoo dot co dot in
    Status: Open
    Bug Type: Filesystem function related
    -Operating System: FreeBSD
    +Operating System: FreeBSD(server operating system)
    PHP Version: 5.2.0
    New Comment:

    FreeBSD is SERVER SYSTEM


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-12-15 05:56:13] sarvesh_borkar at yahoo dot co dot in

    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]root@bak5.abac.com[/email]:/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 this bug report at [url]http://bugs.php.net/?id=39841&edit=1[/url]
    sarvesh_borkar at yahoo dot co dot in Guest

  4. #3

    Default #39841 [Opn->Bgs]: fopen is not opening external urls but opening local files

    ID: 39841
    Updated by: [email]tony2001@php.net[/email]
    Reported By: sarvesh_borkar at yahoo dot co dot in
    -Status: Open
    +Status: Bogus
    Bug Type: Filesystem function related
    Operating System: FreeBSD(server operating system)
    PHP Version: 5.2.0
    New Comment:

    Set allow_url_fopen to On.
    If that doesn't help - check the firewall.
    Not PHP problem.


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-12-15 06:07:00] sarvesh_borkar at yahoo dot co dot in

    FreeBSD is SERVER SYSTEM

    ------------------------------------------------------------------------

    [2006-12-15 05:56:13] sarvesh_borkar at yahoo dot co dot in

    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]root@bak5.abac.com[/email]:/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 this bug report at [url]http://bugs.php.net/?id=39841&edit=1[/url]
    tony2001@php.net Guest

  5. #4

    Default #39841 [Bgs->Opn]: fopen is not opening external urls but opening local files

    ID: 39841
    User updated by: sarvesh_borkar at yahoo dot co dot in
    Reported By: sarvesh_borkar at yahoo dot co dot in
    -Status: Bogus
    +Status: Open
    Bug Type: Filesystem function related
    Operating System: FreeBSD(server operating system)
    PHP Version: 5.2.0
    New Comment:

    I m trying out that


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-12-15 09:53:27] [email]tony2001@php.net[/email]

    Set allow_url_fopen to On.
    If that doesn't help - check the firewall.
    Not PHP problem.

    ------------------------------------------------------------------------

    [2006-12-15 06:07:00] sarvesh_borkar at yahoo dot co dot in

    FreeBSD is SERVER SYSTEM

    ------------------------------------------------------------------------

    [2006-12-15 05:56:13] sarvesh_borkar at yahoo dot co dot in

    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]root@bak5.abac.com[/email]:/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 this bug report at [url]http://bugs.php.net/?id=39841&edit=1[/url]
    sarvesh_borkar at yahoo dot co dot in Guest

  6. #5

    Default #39841 [Opn->Bgs]: fopen is not opening external urls but opening local files

    ID: 39841
    Updated by: [email]tony2001@php.net[/email]
    Reported By: sarvesh_borkar at yahoo dot co dot in
    -Status: Open
    +Status: Bogus
    Bug Type: Filesystem function related
    Operating System: FreeBSD(server operating system)
    PHP Version: 5.2.0
    New Comment:

    Ok.
    Still not PHP problem.


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-12-15 10:24:38] sarvesh_borkar at yahoo dot co dot in

    I m trying out that

    ------------------------------------------------------------------------

    [2006-12-15 09:53:27] [email]tony2001@php.net[/email]

    Set allow_url_fopen to On.
    If that doesn't help - check the firewall.
    Not PHP problem.

    ------------------------------------------------------------------------

    [2006-12-15 06:07:00] sarvesh_borkar at yahoo dot co dot in

    FreeBSD is SERVER SYSTEM

    ------------------------------------------------------------------------

    [2006-12-15 05:56:13] sarvesh_borkar at yahoo dot co dot in

    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]root@bak5.abac.com[/email]:/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 this bug report at [url]http://bugs.php.net/?id=39841&edit=1[/url]
    tony2001@php.net Guest

  7. #6

    Default #39841 [Bgs->Opn]: fopen is not opening external urls but opening local files

    ID: 39841
    User updated by: sarvesh_borkar at yahoo dot co dot in
    Reported By: sarvesh_borkar at yahoo dot co dot in
    -Status: Bogus
    +Status: Open
    Bug Type: Filesystem function related
    Operating System: FreeBSD(server operating system)
    PHP Version: 5.2.0
    New Comment:

    allow_url_fopen is set to On.
    so i think it is a firewall problem only


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-12-15 10:33:13] [email]tony2001@php.net[/email]

    Ok.
    Still not PHP problem.

    ------------------------------------------------------------------------

    [2006-12-15 10:24:38] sarvesh_borkar at yahoo dot co dot in

    I m trying out that

    ------------------------------------------------------------------------

    [2006-12-15 09:53:27] [email]tony2001@php.net[/email]

    Set allow_url_fopen to On.
    If that doesn't help - check the firewall.
    Not PHP problem.

    ------------------------------------------------------------------------

    [2006-12-15 06:07:00] sarvesh_borkar at yahoo dot co dot in

    FreeBSD is SERVER SYSTEM

    ------------------------------------------------------------------------

    [2006-12-15 05:56:13] sarvesh_borkar at yahoo dot co dot in

    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]root@bak5.abac.com[/email]:/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 this bug report at [url]http://bugs.php.net/?id=39841&edit=1[/url]
    sarvesh_borkar at yahoo dot co dot in Guest

  8. #7

    Default #39841 [Opn->Bgs]: fopen is not opening external urls but opening local files

    ID: 39841
    Updated by: [email]tony2001@php.net[/email]
    Reported By: sarvesh_borkar at yahoo dot co dot in
    -Status: Open
    +Status: Bogus
    Bug Type: Filesystem function related
    Operating System: FreeBSD(server operating system)
    PHP Version: 5.2.0
    New Comment:

    Great.
    Please don't reopen the report.


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-12-15 11:07:38] sarvesh_borkar at yahoo dot co dot in

    allow_url_fopen is set to On.
    so i think it is a firewall problem only

    ------------------------------------------------------------------------

    [2006-12-15 10:33:13] [email]tony2001@php.net[/email]

    Ok.
    Still not PHP problem.

    ------------------------------------------------------------------------

    [2006-12-15 10:24:38] sarvesh_borkar at yahoo dot co dot in

    I m trying out that

    ------------------------------------------------------------------------

    [2006-12-15 09:53:27] [email]tony2001@php.net[/email]

    Set allow_url_fopen to On.
    If that doesn't help - check the firewall.
    Not PHP problem.

    ------------------------------------------------------------------------

    [2006-12-15 06:07:00] sarvesh_borkar at yahoo dot co dot in

    FreeBSD is SERVER SYSTEM

    ------------------------------------------------------------------------

    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
    [url]http://bugs.php.net/39841[/url]

    --
    Edit this bug report at [url]http://bugs.php.net/?id=39841&edit=1[/url]
    tony2001@php.net Guest

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139