php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40881 file_get_contents with localhost on Vista
Submitted: 2007-03-21 11:22 UTC Modified: 2007-03-21 12:16 UTC
From: tkauk at t-online dot de Assigned:
Status: Not a bug Package: Streams related
PHP Version: 5.2.1 OS: Vista
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: tkauk at t-online dot de
New email:
PHP Version: OS:

 

 [2007-03-21 11:22 UTC] tkauk at t-online dot de
Description:
------------
file_get_contents fails to open a stream with an "http://localhost inside". 
Pinging or open the url via a browser works fine.
The same environment (apache, php.ini, etc.) works on XP.
Any ohter url not containing localhost(includung 127.0.0.1) works fine.



Reproduce code:
---------------
<?php
$myUrl = "http://localhost/index.html";
//$myUrl = "http://127.0.0.1/index.html";
if (!($cont=file_get_contents($myUrl))) {
  echo "<br/>error opening Url:" . $myUrl . " <br/>";
 }
 else {
   echo "$cont";
 }
?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-21 12:16 UTC] tony2001@php.net
Not PHP problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Oct 07 11:01:28 2024 UTC