ID:               12360
 Comment by:       uros at sir-mag dot com
 Reported By:      hordur at modernus dot is
 Status:           Closed
 Bug Type:         Sockets related
 Operating System: RedHat 6.2
 PHP Version:      4.3
 New Comment:

I'm using PHP 4.3.3 on FreeBSD and also have problems with this
fsockopen

It seams that no timeout is using, because simple script takes about 1
minute to finish with error.

$fp = @fsockopen ('www.damirjosar.com', 80, $errno, $errstr, 1.0);
print_r($errno);
print_r($errstr);
print_r($fp);

Error is:
22 Invalid argument

And it takes about 1 minute. What about 1.0 second I set.

If i use regular system call like dig or nslookup It only takes about
10s for this host.

I have same problems with function checkdnsrr and gethostbyname


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

[2003-09-15 03:09:35] johannes at zoomposters dot com

php 4.3.3, redhat 7.3
still not working!

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

[2003-08-26 07:20:43] s dot tijink at snoopmedia dot com

the same on PHP 4.3.3 / SuSE 8.0

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

[2003-08-26 05:36:21] s dot tijink at snoopmedia dot com

Hi,
using PHP 4.3.2 stable on SuSE 8.0 i've still the same problem that I
got no timeout on fsockopen or stream_set_timeout.

Greetz,
Stephan Tijink

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

[2002-12-22 09:59:11] [EMAIL PROTECTED]

An additional note:

Under BSDi and threaded builds, the timeout isn't respected.
Additionally the openssl test, takes much longer, which leads me to
believe, this is a BSDi threading issue, to do with time values. This
issue doesn't surface, when --with-experimental-zts is removed from the
equation and can't be reproduced on FreeBSD.

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

[2002-12-22 08:02:16] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

Fixed (will be in 4.3.0).

The problem was related to IPv6 support; specifically, if getaddrinfo
returned multiple addresses, PHP would try each in turn, waiting up to
the full timeout for each.
Now, we abort the loop if a connection times out.

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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/12360

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

Reply via email to