|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63102 built in server can not file_get_contents file of the same domain
Submitted: 2012-09-17 15:45 UTC Modified: 2012-09-17 18:55 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: eward dot song at gmail dot com Assigned:
Status: Not a bug Package: Built-in web server
PHP Version: 5.4Git-2012-09-17 (Git) OS: mac os x
Private report: No CVE-ID: None
 [2012-09-17 15:45 UTC] eward dot song at gmail dot com
the situation is that: 
run a php build in server, use commend: php -S, and in you current 
dir, there are two file: a.php and b.php . a.php use file_get_contents catch a 
echo file_get_contents('');
b.php just  print string 'hello world'. When run the a.php through the web 
browser, you can find that, the build in server return 'failed to open stream: 
HTTP request failed!'.
If just browser the b.php, you can get hello world current, and if the file at 
a.php is not a http request which domain is the same of a.php, such as 'b.php', 
or '', server is all right.
This kind problem do not occur when use apache as cgi.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-09-17 18:55 UTC]
-Status: Open +Status: Not a bug
 [2012-09-17 18:55 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

The embedded server is single-threaded. Currently there are no plans to change that.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Feb 25 05:01:26 2024 UTC