ID: 49166 User updated by: s dot daudell at boldwebservices dot com Reported By: s dot daudell at boldwebservices dot com -Status: Feedback +Status: Open Bug Type: Sockets related Operating System: Windows XP Pro PHP Version: 5.3.0 New Comment:
As i mentioned, sockets are enabled, the extension shows up as loaded, in the WAMP interface, in phpinfo(), and in php.ini However when the function is called, it results in a fatal error. This same script worked fine in 5.2.6 I was installing my software on a new machine with the newer version of PHP, following my same setup procedures that worked before, and now it doesnt work. Previous Comments: ------------------------------------------------------------------------ [2009-08-05 07:36:36] [email protected] Wild guess: sockets extension isn't loaded? Check your phpinfo() output. ------------------------------------------------------------------------ [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
