Edit report at https://bugs.php.net/bug.php?id=63102&edit=1
ID: 63102 Updated by: johan...@php.net Reported by: eward dot song at gmail dot com Summary: built in server can not file_get_contents file of the same domain -Status: Open +Status: Not a bug Type: Bug Package: Built-in web server Operating System: mac os x PHP Version: 5.4Git-2012-09-17 (Git) Block user comment: N Private report: N New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The embedded server is single-threaded. Currently there are no plans to change that. Previous Comments: ------------------------------------------------------------------------ [2012-09-17 15:45:00] eward dot song at gmail dot com Description: ------------ the situation is that: run a php build in server, use commend: php -S 127.0.0.1:8081, and in you current dir, there are two file: a.php and b.php . a.php use file_get_contents catch a file: <?php echo file_get_contents('http://127.0.0.1:8081/b.php'); ?> 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 'http://google.com/', server is all right. This kind problem do not occur when use apache as cgi. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63102&edit=1