ID:               49166
 Updated by:       [email protected]
 Reported By:      s dot daudell at boldwebservices dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Sockets related
 Operating System: Windows XP Pro
 PHP Version:      5.3.0
 New Comment:

Wild guess: sockets extension isn't loaded? Check your phpinfo()
output.


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

[2009-08-05 04:14:01] s dot daudell at boldwebservices dot com

Description:
------------
I just installed a newer version of WAMP, with php 5.3.0 and enabled
sockets.

This script has worked fine on older versions of php, but now is coming
up with an 'called to undefined function socket_create();' error


Reproduce code:
---------------
//-- Set some variables
$host                     = "192.168.1.103";
$port                     = 9001;

//-- Create socket
$socket = socket_create(AF_INET, SOCK_STREAM, 0) or die("Could not
create socket\n");

//-- Bind socket to port
socket_bind($socket, $host, $port) or die("Could not bind to
socket\n");
echo "Binded to server address: ".$host."\r\n"."On port:
".$port."\r\n\r\n";

//-- Start listening for connections
socket_listen($socket, 3) or die("Could not set up socket
listener\n");
echo "Waiting for connections...\r\n";

Expected result:
----------------
It should start listening for raw text to come in on that data.



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


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

Reply via email to