php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2493 fopen/readfile of URL don't output anything
Submitted: 1999-10-11 21:24 UTC Modified: 2000-07-29 23:57 UTC
From: zakon at erols dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0 Beta 2 OS: Windows2000RC2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: zakon at erols dot com
New email:
PHP Version: OS:

 

 [1999-10-11 21:24 UTC] zakon at erols dot com
Neither of the following snippets return anything.
System chugs away for a few seconds and command prompt
returns (also tried it via a web request).  Same result
when substituting hostname with ip address.

// test 1
   <?php
   readfile("http://www.php.net/");
   ?>

// test 2
   <?php
   $fp = fopen("http://www.php.net/","r");
   if (!fp) {
     echo "unable to open url";
     exit;
   } 
   echo "here\n";   # code never gets here
   while (!feof($fp)) {
     $thepage .= fgets($fp,4096);
   }
   fclose($fp);
   echo "...\n$thepage...\n";
   ?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-23 01:07 UTC] zak at cvs dot php dot net
I will have Win2k installed on the 24th or 25th.  Will test problem with latest release of PHP.
 [2000-07-29 23:57 UTC] zak@php.net
Cannot reproduce error using win2k, apache 1.3.12, php 4.01rc2

Please install a recent release of PHP.  If the problem reoccurs, submit a new bug report.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 19:01:36 2025 UTC