Professional Web Applications Themes

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

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]rootbak5.abac.com[/email]:/var/obj/usr/src/sys/PRO6 ...

  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]rootbak5.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. #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]rootbak5.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

  3. #3

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

    ID: 39841
    Updated by: [email]tony2001php.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]rootbak5.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

  4. #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]tony2001php.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]rootbak5.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

  5. #5

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

    ID: 39841
    Updated by: [email]tony2001php.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]tony2001php.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]rootbak5.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

  6. #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]tony2001php.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]tony2001php.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]rootbak5.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

  7. #7

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

    ID: 39841
    Updated by: [email]tony2001php.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]tony2001php.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]tony2001php.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

Similar Threads

  1. Opening URLs in a New window...(with a twist)
    By dk_says_hey in forum Macromedia Flash Actionscript
    Replies: 1
    Last Post: March 3rd, 06:18 PM
  2. Opening URLs in a New window...(with a twist)
    By DannyYOYO in forum Macromedia Flash Actionscript
    Replies: 0
    Last Post: February 27th, 10:20 PM
  3. opening external Files
    By Elad Brandes in forum Macromedia Director Lingo
    Replies: 1
    Last Post: October 26th, 06:20 PM
  4. #25619 [Opn->Fbk]: fopen crashes while opening redirected pages
    By rasmus@php.net in forum PHP Development
    Replies: 0
    Last Post: September 21st, 02:54 PM
  5. #25619 [NEW]: fopen crashes while opening redirected pages
    By info at kktcbul dot com in forum PHP Development
    Replies: 0
    Last Post: September 21st, 02:44 PM

Bookmarks

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