ID:               32363
 Updated by:       [EMAIL PROTECTED]
 Reported By:      motion_4u at hotmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Sockets related
 Operating System: Apache 2 on win2k
 PHP Version:      5.0.3
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




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

[2005-03-18 17:36:56] motion_4u at hotmail dot com

Description:
------------
socket_bind() function on Apache2/ Win2k can't bind

Reproduce code:
---------------
$dest="127.0.0.1";
$port=80;
//"daemon" in UDP
$socketD = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); 

if($socketD === FALSE) { // something went wrong
       echo 'socket_create failed:
'.socket_strerror(socket_last_error())."\n";
       exit(1);
   } 
   /*
   This is the second option but still doesn't work
   if(!socket_bind($socketD, "0.0.0.0", 27123)) 
   */
   if(!socket_bind ($socketD, 0, $port))
   {
   socket_close($socketD);
   echo 'socket_bind failed:
'.socket_strerror(socket_last_error())."\n";
    exit(1);
   }

Expected result:
----------------
This is the PHP error message:
Warning: socket_bind() [function.socket-bind]: unable to bind address
[0];

I realy dug into the documentations and examples and find it hard to
believe that I do something wrong. The warning message explains that
the socket it already binded and cannot be used twice :((



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


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

Reply via email to