unable to use socket_create
Posted on 2006-05-03
I've been having a horrible time trying to get my IIS 6 server on Win 2k3 to read an authentication validation snippet from another server. The PHP code I've been trying to use puts together a GET request through a socket to the authentication server and receives an XML snippet in return, validating the ticket sent with the GET.
Anyway, this code won't work, and after fooling around with everything, I've realized that I can't even open a socket on the server. When I try something simple like:
$s = socket_create(AF_INET, SOCK_STREAM, 0) or die("couldn't create socket");
It dies on me every time and I get the error:
Warning: socket_create(): Unable to create socket : A protocol was specified in the socket function call that does not support the semantics of the socket type requested. in code.php on line 185
couldn't create socket
I've tried all the other methods PHP has for using sockets, and no matter what, the pointer is always null.