3

I am trying to enable Socket in PHP on linux. I checked php.ini but in that file not getting following line.

;extension=php_sockets.so
Sandy8086
  • 653
  • 1
  • 4
  • 14

2 Answers2

3

As you have installed php5 libapache2-mod-php5, according to it.

The following extensions are built in: bcmath bz2 calendar Core ctype date dba dom ereg exif fileinfo filter ftp gettext hash iconv json libxml mbstring mhash openssl pcre Phar posix Reflection session shmop SimpleXML soap sockets SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter zip zlib.

Vinay
  • 2,564
  • 4
  • 26
  • 35
1

It does not need external module. check phpinfo() result to see if PHP compiled with --enable-sockets or not! (if you installed it using apt-get or software center of Ubuntu, It must be ok yet!)

Sadeq
  • 71
  • 6
  • 1
    Yes, accorindg to php5_5.3.10-1ubuntu3.2.diff from http://packages.ubuntu.com/precise/php/php5 the php core is compiled with `--enable-sockets` -> sockets module should be "within" the php core. – VolkerK Aug 27 '12 at 11:47