You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jason Chinnes <Ja...@ITONCALL.NET> on 2003/12/05 12:59:07 UTC
[users@httpd] Apache 1.3 (Win32) timeout reading from socket to same child
I am running Apache/1.3.28 (Win32) with mod_php4 (SAPI), mod_perl, and
tomcat. No matter what module I use, I can not read any data from a
socket that is opened to the host machine. I have given to examples
that illustrate what I'm trying to accomplish. In short, a user makes a
request to test.php or test.pl which, in turn, make their own request
and pass the output back to the user. Both versions work when they
connect to a different host. They also work when I set apache's
MaxRequestsPerChild to 1 and request a local file. In both cases, I am
able to connect, and make the request. Apache's access.log shows that
it's ip made the request. When I try to read the response, both scripts
hang and eventually time out. I have found nothing online that has
mentioned this behavior. Has anyone had a similar experience?
--- test.php ---
<?php
$fp = fsockopen ("127.0.0.1", 80, $errno, $errstr, 30);
fputs ($fp, "GET / HTTP/1.0\r\n"
. Host: 127.0.0.1\r\n\r\n");
while (!feof($fp)) echo fgets ($fp,128);
fclose ($fp);
?>
--- test.pl ---
use CGI;
use Data::Dumper;
use HTTP::Request;
use LWP::UserAgent;
my $q = new CGI;
$ua = new LWP::UserAgent;
print $q->header; # create the HTTP header
$request = new HTTP::Request GET => 'http://127.0.0.1'; $response =
$ua->request($request); print $response->content;
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org