ID:               41084
 User updated by:  gabriel at casaavenida dot com dot br
-Summary:          ?
 Reported By:      gabriel at casaavenida dot com dot br
 Status:           Open
 Bug Type:         Sockets related
 Operating System: Windows XP
 PHP Version:      5.2.1
 New Comment:

I am Sorry my bad english. 

I am test in Linux, php 4.3.3, 
Same Error. 
In other station under Windows in PHP Version 5.0.3
Same Error

Always Responde is open. 
The port not open in the machine.


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

[2007-04-14 07:46:13] gabriel at casaavenida dot com dot br

Description:
------------
fsockopen: udp port not open, response always true.

Reproduce code:
---------------
function service_enable($serverip,$port,$protocol)  {
    error_reporting(1);
        $fp = fsockopen ("$protocol://$serverip", $port, $errno, $errstr);

    if(!$fp) {
          $status = 'NOT OPEN';

        } else {
          $status = 'OPEN';
        }
       return $status;
}

echo service_enable('127.0.0.1','80',udp);

Expected result:
----------------
NOT OPEN

Actual result:
--------------
OPEN


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


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

Reply via email to