ID:               27401
 Updated by:       [EMAIL PROTECTED]
 Reported By:      ycallen at ndsisrael dot com
 Status:           Bogus
 Bug Type:         Apache related
 Operating System: RHEL linux
 PHP Version:      4.3.4
 New Comment:

You're using old version too. Latest stable CVS snapshot has lot of
bugs fixed..




Previous Comments:
------------------------------------------------------------------------

[2004-02-26 07:22:43] ycallen at ndsisrael dot com

If that was the case then no php scripts would work at all.Basic php
scripts work.The only problem i found so far was with fopen.

------------------------------------------------------------------------

[2004-02-26 07:17:07] [EMAIL PROTECTED]

Of course it times out in debug mode since there's only one child
serving requests..and the one request is taken by your script calling
the other script..



------------------------------------------------------------------------

[2004-02-26 06:14:44] ycallen at ndsisrael dot com

it works using :



wget -O - "http://localhost/~php/recieve.php?param1=1&param2=2";

------------------------------------------------------------------------

[2004-02-26 06:07:44] postings-php-bug at hans-spath dot de

What happens when you execute the following line on a shell?

wget -O - "http://localhost/~php/recieve.php?param1=1&param2=2";

------------------------------------------------------------------------

[2004-02-26 05:57:54] ycallen at ndsisrael dot com

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=1m2=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&param2=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=1m2=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




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27401&edit=1

Reply via email to