Reputation: 2419
I switched from Lighttpd server to WAMP and then found sockets in php are not working. But php is configured and working. (phpinfo() works) I removed the comment for the php_sockets.dll in php.ini @ C:\wamp\bin\php\php5.2.5.but still gives the error "Fatal error: Call to undefined function socket_create()". Any more configurations to do to enable sockets in php in WAMP? (php_sockets.dll is there as well, I've checked)
Thank You!
Upvotes: 0
Views: 7288
Reputation: 1157
Apparently there are two php.ini files - and the command line uses a different one to the Apache server.
find the line ;extension=php_sockets.dll and remove the semi-colon from both files.
The Apache php.ini file is located at: X:\WAMP INSTALL DIR\bin\apache\Apache2\bin\php.ini
The command prompt php.ini file is located at: X:\WAMP INSTALL DIR\bin\php\php.ini
Worked straight away for me...
Upvotes: 7
Reputation: 48357
Title is misleading - in your case PHP soockets are merely not available.
I removed the comment for the php_sockets.dll in php.ini @ C:\wamp\bin\php\php5.2.5
Did you check that is the .ini file which PHP is using at runtime?
Did you restart the webserver?
Have you got all logging enabled?
Do you get startup errors?
C.
Upvotes: 1