Novice help, socket unable to create socket
Warning:socket_create (): Unable to create socket [94]: Socket type not supported in/web/xxx/apicookie.php on line 16
Warning:socket_connect () expects parameter 1 to BES resource, boolean given in/web/xxx/apicookie.php on line 28
This is the PHP error I was prompted when I used the function to create the socket!
$socket = Socket_create (AF_INET,0,SOL_TCP);
$result = @socket_connect ($socket, $address, $service _port);
The rest of the variables are not posted!
The code is not wrong! My testing on other servers is normal!
The error is a Linux vps!. I use the domestic AMH panel! The site you created!
The sockets extension is already open!
PHPINFO also saw that it did turn on!
What the hell is the reason? I searched the internet Baidu is no result!
To Google foreign posts that the firewall is blocked! And then I'm going to shut down the firewall! It's still not going to be tested!
I wonder if it's a matter of authority?
Socket Server
Share to:
------Solution--------------------
Socket_create (AF_INET,SOCK_STREAM,SOL_TCP)