0

Ok, so when I run my php file it gives me this error:

PHP Warning: PHP Startup: Unable to load dynamic library 'php_sockets.dll'

In my php.ini file, I've added the line "extension=php_sockets.dll" but it still gives me this error. I've searched many ways of solving this problem but they didn't work.

I've noticed someting in the error. It said this:

C:\xampp\php\ext\php_php_sockets.dll.dll (The specified module could not be found.))

Why does it say php_php_socketsdll.dll? How can I fix this?

  • Probably the [php.ini extension name change for php 7.2+](https://wiki.php.net/rfc/load-ext-by-name), you should use `sockets` as extension name. The prefix `php_` and the OS dependent library suffix `.dll` will be added, hence the name `php_php_sockets.dll.dll`. It's weird thought since the documentation only states it is *recommended* to use it. – makadev May 27 '20 at 12:22
  • I deleted the `extension=php_sockets.dll` line and uncommented de `extension=socket` line and it gave me the same errors... – João Teixeira May 27 '20 at 12:44
  • Does `C:\xampp\php\ext\php_sockets.dll` actually exist? Also, check that your `extension_dir` entry in the php.ini has the [full path (absolute path) inclusive driveletter](https://stackoverflow.com/a/25027173/3828957). – makadev May 29 '20 at 09:16
  • yes it does exist. Also, the full path was already correct. – João Teixeira Jun 03 '20 at 17:01

0 Answers0