0

And the "fix" that work for others but not me is to remove the ; from ";extension=sockets" in php.ini configuration file. Even when I restart XAMPP, apache server, even the whole computer it still doesn't work. Adding extension=php_sockets.dll doesn't work either. (I'm on windows 7 php version 8)

katten elvis
  • 1
  • 1
  • 1
  • See [this comment](https://stackoverflow.com/questions/6137823/fatal-error-call-to-undefined-function-socket-create#comment41069662_6137855). Have you edited the correct `.ini` file? – El_Vanja May 19 '21 at 09:52
  • Are you certain that you've edited the correct php.ini file? Sometimes there may be multiple versions, or the cgi version Apache is using may have a different ini file – Martin May 19 '21 at 09:52
  • Ok my PHP installation had two .ini folders, php.ini-development and php.ini-production. I found and undocumented the ; in ";extensions=sockets" and I still get the same error – katten elvis May 19 '21 at 10:07
  • Try writing `extension=php_sockets.dll` in the php.ini file that is in the apache folder (not only the one that's in the PHP folder). It's a bit confusing, but do a search for "php.ini" in your entire XAMPP folder and you'll find it. – dearsina May 19 '21 at 10:56
  • There is no such file in the appache folder, and after editing every single .ini, .ini-development and .ini-production file to include "extension sockets extension=php_sockets.dll" it still gives the same error – katten elvis May 19 '21 at 11:24

0 Answers0