Fatal error: Call to undefined function socket_create()
You'll need to install (or enable) the Socket PHP extension: http://www.php.net/manual/en/sockets.installation.php
Fatal error: Call to undefined function socket_create() even though enabled in php.ini
Type in the following command from your command line:
php --ini
That will tell you which php.ini file is being loaded. I suspect you are running websockets from the command line, and your php is initializing a different config file when in CLI mode.
phpwebsocket - Undefined Function socket_create() - Have php_sockets enabled on Windows/WAMP
Found the answer in another thread:
Error with PHP Websocket and Wamp Server
Turns out running the file on the command line means it uses a different php.ini file than the WAMP server does. Seems stupid, but turned out php_sockets wasn't uncommented in that php.ini file, and removing it removed the error with it.
Related Topics
Calling Stored Procedure with Out Parameter Using Pdo
Type-Juggling and (Strict) Greater/Lesser-Than Comparisons in PHP
Double Not (!!) Operator in PHP
PHP Errors Not Being Displayed in the Browser [Ubuntu 10.10]
How to Declare a Two Dimensional Array
Get the Last Modified Date of a Remote File
Continue Processing After Closing Connection
How to Remove "Via" and Server Name When Sending Mails with PHP
Laravel 5 - After Login Redirect Back to Previous Page
Preg Match Text in PHP Between HTML Tags
How to Embed Images in a Single HTML/PHP File
Laravel Eloquent, Group by Month/Year
Passing Data from Controller to View in Laravel
What Is Better in a Foreach Loop... Using the & Symbol or Reassigning Based on Key
How to Use Include Within a Function
Efficiently Pick N Random Elements from PHP Array (Without Shuffle)