ID:               30374
 User updated by:  labsy at seznam dot org
 Reported By:      labsy at seznam dot org
-Status:           Feedback
+Status:           Open
 Bug Type:         Sockets related
 Operating System: Windows 2000/XP
 PHP Version:      5.0.2
 New Comment:

Unfortunatelly, I do not have Linux box for testing.

And to make it clear - if we have 2 machines, the only important and
relevant is machine with Windows 2000/XP server, which hosts the buggy
script.
The other machine might be anything - bug is reproductible when this
other machine has web server hanged or crashed, which makes our first
machine to hang, too!


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

[2004-10-11 01:22:47] [EMAIL PROTECTED]

Does it hang if you try and reach it from linux ?

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

[2004-10-09 16:56:56] labsy at seznam dot org

Description:
------------
This bug has been reported 2 years ago, but it is still present in last
5.0.2 version.
PHP installed on Windows 2000 server or on Windows XP, all with latest
service packs. PHP run as ISAPI.

HOW TO TEST:
For destination IP $domain in my script, please use some remote machine
with IIS 5.0 or IIS 5.1.
Try the script and it should pass.
Now, on REMOTE machine, go and crash IIS service. For example, you may
crash it for sure this way:
- install PHP on remotemachine as ISAPI
- in PHP.INI enable some extension, which does not exist - try
php_pdf.dll
- start IIS and IIS should hang

Now, run the script again to test hanged IIS machine. Script should
exit with FATAL ERROR or in worst case, with IIS hang on your first
machine.

Reproduce code:
---------------
<?php
$domain = ""; //enter some IP - see instructions below!
$port = "80";
$fp = fsockopen($domain,$port,$errno,$errstr,2) ;
if (!$fp){
             $output = '<br>SOCKET: '.$domain.':'.$port.' FAILED
responding!';
} else {
             $output = '<br>SOCKET: '.$domain.':'.$port.' responded
OK';
             fclose($fp);
}
?>



Expected result:
----------------
fsockopen() should return TRUE or FALSE, but in any case it should exit
within set TIMEOUT value (which is 2 seconds in this case).

Actual result:
--------------
In case that destination socket is IIS and it is CRASHED or HANGED, the
script will not terminate after 2 seconds, but will try open socket
until PHP timeout occures.
And additionally - in some cases, if PHP is run on IIS 5.0 or 5.1,
script may HANG and LOCK IIS so you need to restart machine. W3SVC
stops responding.


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


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

Reply via email to