Novice, socket unable to create socket

Source: Internet
Author: User
Tags php error
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);
[Email Protected]_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)
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.