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.