You'll need to install or enable the socket extension. The error "Call to undefined function socket_create()" occurs when the socket extension is not enabled or installed on your server. The socket_create() function is a part of the socket extension in PHP, and it allows you to create a new socket endpoint for communication.
Check All Config
<?PHP
phpinfo();
?>
if you need to install the socket package
sudo apt-get install php-sockets
After that Go to php.ini and just uncomment
Manual process
;extension=php_soap.dll
extension=php_sockets.dll
;extension=php_sqlite3.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
Use Terminal Command Line
cd /etc/php/7.0/cli
sudo nano php.ini
Get the latest news and updates by signing up to our daily newsletter.We won't sell your email or spam you !