ID: 12360 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Verified +Status: Closed Bug Type: Sockets related Operating System: RedHat 6.2 PHP Version: 4.3 New Comment:
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. Previous Comments: ------------------------------------------------------------------------ [2002-12-11 19:00:15] [EMAIL PROTECTED] Verified on BSD boxes only: BSDI 4.3 FreeBSD 4.6.2-RELEASE-p3 also tested but not reproduced on: SuSE 7.0 (Linux 2.2.16) WinXP It's interesting to note that the *bsd boxes have IPv6 support while the linux and xp boxes do not. I'm waiting for some more feedback on some other boxes. I wonder if this is an IPv6 problem? ------------------------------------------------------------------------ [2002-12-11 12:06:39] [EMAIL PROTECTED] i have had the latest version for some time now, and the problem persists. scripts with the fsockopen function STILL DO HANG. ------------------------------------------------------------------------ [2002-09-28 17:49:42] [EMAIL PROTECTED] [EMAIL PROTECTED]: 4.1.2 is too old; can you try a non-stable snapshot from http://snaps.php.net/win32/. Despite the term non-stable, it should be quite stable and will form the base of PHP 4.3 which we are branching for QA and the release process shortly. ------------------------------------------------------------------------ [2002-09-28 16:18:59] [EMAIL PROTECTED] It's now year 2002 and I'm using php 4.1.2 and neither is the timeout parameter to the fsockopen function working properly, nor is the socket_set_timeout function.... i've written a small monitoring program that kills php processes that has been working too long (i use the php scripts by running them in the console).. and the interesting thing is that when i run the same script in several instances, they seem to hang in pairs (but NOT always). Perhaps they try to use the same outgoing port? and this is not something rare, i've been logging the kills and it happens once (two kills) every 10-15 minutes, once killed they are restarted by a loop in a batch file. i'm using windows xp with php 4.1.2 and apache (but as i said, i'm simply running the scripts without apache in the console, "php script.php"..) i remember having this problem when run in linux.. i've seen many similar bugreports but nothing seem to have been done to adress the problem.. keep up the good work, Osman Darcan ------------------------------------------------------------------------ [2001-08-10 16:16:06] [EMAIL PROTECTED] I put that include in CVS, and it will be in 4.0.7 if there are no problems with it. I did limited testing, but don't know this helped. alindeman: _please_ test this... If this isn't fixed, please reopen. ------------------------------------------------------------------------ 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