|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2004-02-26 06:07 UTC] postings-php-bug at hans-spath dot de
  [2004-02-26 06:14 UTC] ycallen at ndsisrael dot com
  [2004-02-26 07:17 UTC] sniper@php.net
  [2004-02-26 07:22 UTC] ycallen at ndsisrael dot com
  [2004-02-26 07:27 UTC] sniper@php.net
  [2004-02-26 07:27 UTC] ycallen at ndsisrael dot com
  [2004-02-26 09:36 UTC] ycallen at ndsisrael dot com
  [2004-04-13 03:39 UTC] coadmin at hostings dot com dot pl
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 21:00:02 2025 UTC | 
Description: ------------ I do the following steps: 1.I run apache in debug mode(httpd -X). 2.I have a php script(send.php) that tries to access another php script(recieve.php)using fopen with a url.The url points to localhost[example : fopen("http://localhost/~php/recieve.php)]. 3.The program hangs and eventually times out with the following warning : "Warning: fopen(http://localhost/~php/recieve.php?param1=1??m2=2): failed to open stream: HTTP request failed! ???^ in /home/php/public_html/send.php on line 6" This only happens when i run apache in debug mode.When i run apache in regular mode then it works. Reproduce code: --------------- recieve.php: <?php echo "with GET<br>"; echo "my first param is: ".$_GET['param1']."<br>"; echo "my second param is: ".$_GET['param2']."<br>"; ?> send.php: <?php $url = "http://localhost/~php/recieve.php?param1=1¶m2=2"; $opts = array('http' => array('method' => "GET")); $context = stream_context_create($opts); echo "before fopen<br>"; $fp = fopen($url, "r", true, $context); fpassthru($fp); fclose($fp); ?> Expected result: ---------------- before fopen with GET my first param is: 1 my second param is: 2 Actual result: -------------- before fopen Warning: fopen(http://localhost/~php/recieve.php?param1=1??m2=2): failed to open stream: HTTP request failed! ???^ in /home/php/public_html/send.php on line 6 Warning: fpassthru(): supplied argument is not a valid stream resource in /home/php/public_html/send.php on line 7 Warning: fclose(): supplied argument is not a valid stream resource in /home/php/public_html/send.php on line 8