#23161 [NEW]: Net_Portscan::checkPort doesn't close socket

From: Date: Fri, 11 Apr 2003 08:56:45 +0000
Subject: #23161 [NEW]: Net_Portscan::checkPort doesn't close socket
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-15110@lists.php.net to get a copy of this message
From: hasegawa at neo dot nectec dot or dot th Operating system: W2K PHP version: 4.3.0 PHP Bug Type: PEAR related Bug description: Net_Portscan::checkPort doesn't close socket Followings are the source code of Net_Portscan::checkPort. [[Copy from http://cvs.php.net/co.php/pear/Net_Portscan/Portscan.php?login=2&r=1.3]] ------------------ function checkPort($host, $port, $timeout = 30) $socket = @fsockopen($host, $port, $errorNumber, $errorString, $timeout); if (!$socket) { return NET_PORTSCAN_NO_SERVICE; } return NET_PORTSCAN_SERVICE_FOUND; } ------------------ When fsockopen successfuly connect the host/port, it returns resource for socket. But above code doesn't close socket. When fsockopen returns resource of socket, the socket should be closed with fclose function. //Hasegawa -- Edit bug report at http://bugs.php.net/?id=23161&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23161&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23161&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23161&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23161&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23161&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23161&r=support Expected behavior: http://bugs.php.net/fix.php?id=23161&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23161&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23161&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23161&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23161&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23161&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23161&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23161&r=gnused

« previous php.pear.dev (#15110) next »