Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable Socket in PHP?

Tags:

php

sockets

Could any one tell me how to enable SOCKET support in PHP ?

like image 414
Fero Avatar asked Sep 01 '09 11:09

Fero


People also ask

Can we use socket in PHP?

Socket programming is responsible for establishing that connection between applications to interact. By the end of this tip, we will learn how to create a simple client-server in PHP. We will also learn how client application sends message to server and receives it from the same.


1 Answers

This answer assumes you do have a php_sockets.dll extension file accessible (in your PHP installation extension directory or where required);

If you're using windows, just uncomment the following line in your php.ini file:

;extension=php_sockets.dll 

If you are missing the php_sockets.dll, you can download it from php.net.

like image 145
Sampson Avatar answered Sep 28 '22 05:09

Sampson