Bug #12360 Updated: fsockopen timeout doesn't work
| From: | andy@php.net | Date: | Wed, 25 Jul 2001 13:34:30 +0000 |
| Subject: | Bug #12360 Updated: fsockopen timeout doesn't work | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-60950@lists.php.net to get a copy of this message | ||
ID: 12360
Updated by: andy
Reported By: hordur@modernus.is
Old Status: Feedback
Status: Analyzed
Bug Type: Sockets related
Operating System: RedHat 6.2
PHP Version: 4.0.6
New Comment:
I have reproduced this error.
When requesting an valid address, but a port that the server
does not listen on, the script hangs.
(*Andy*)
Previous Comments:
------------------------------------------------------------------------
[2001-07-25 09:30:06] hordur@modernus.is
or at least it doesn't time out until after a very long time....
------------------------------------------------------------------------
[2001-07-25 09:29:17] hordur@modernus.is
it never times out...
------------------------------------------------------------------------
[2001-07-25 09:24:26] andy@php.net
are you saying that is eventually times out (but not a the
number you specified) or are you saying it never times out.
------------------------------------------------------------------------
[2001-07-25 07:08:38] hordur@modernus.is
When I try to connect to a port on a server that isn't reachable or the packets are dropped the
timeout doesn't work...
This worked when I was using PHP 4.0.4pl1
#!/usr/local/bin/php
<?php
echo "opening socket... \n";
fsockopen("microsoft.com", 12, $errno, $errstr, 5.0);
echo "$errno\n$errstr\n";
echo "done!\n";
?>
I have also tried this on a Red Hat 7.1 machine and it's just the samee there...
My configure line: './configure' '--with-zlib-dir=/usr/lib'
'--with-png-dir=/usr/local/lib' '--with-gd=/usr/local'
'--with-ttf=/software/freetype' '--with-apxs=/software/web/bin/apxs'
'--with-mysql=/software/mysql/'
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=12360&edit=1