ScenarioI am using WAMP (wampserver) and trying to run a chat service program via HTML 5 with the use of websockets.
I did enable my php_sockets via WAMP interface.
wamp > PHP > PHP Extensions > php_sockets
Upon trying, I received an error from the command prompt saying:
Fatal error: Call to undefined function socket_create() in [FILE] on line [LINE OF CODE]
SolutionIt seems that the command prompt was using a different configuration file for PHP.
Apache (or from the WAMP's interface) uses a
php.inithat is located at:
If you will open this file, you may notice that the line
extension=php_sockets.dllis already commented out.
Unfortunately, the CLI or command line interface is using a different configuration file which is located at:
In order to resolve it, you should comment out the line
extension=php_sockets.dlland save it. Run the program after to see if the websockets again are already up and working.