using Windows XP - SP2
IIS
PHP 5.2.3
I have searched online for this error message and I have tried the various suggestions, so now I have run out of things to try.
So far I have:
1) uncommented extension=php_sockets.dll in php.ini
2) made sure that the above dll file is physically in the extension_dir (C:/PHP5/ext)
3) restarted IIS service after changing php.ini
4) made sure the php.ini that I am editing, is the one mentioned in the php_info in Loaded Configuration File item.
php_info does not show major heading about sockets like it does with gd, or mssql - all it finds when I search for 'socket' on the php-info page is
registered stream socket transports - tcp, udp
default_socket_timeout - 60
Should I see anything else if the socket extension is loaded?
and still I get the following error:
Fatal error: Call to undefined function socket_create() in ........ line .....
My php code copied from the manual page (changed host to localhost) to test this is:
Expand|Select|Wrap|Line Numbers
- <?php
- // set some variables
- $host = "127.0.0.1";
- $port = 12345;
- echo "127.0.0.1 12345<BR>";
- set_time_limit(0);
- // create socket
- $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP) or die("Could not create socket\n");
- socket_close($socket);
- echo "*** DONE ***";
- exit;
Thanks,
Paul