user2502611
user2502611

Reputation: 147

Apache and PHP Curl Issue

In my apache error.log I have the following line:
PHP Warning: PHP Startup: Unable to load dynamic library 'ext\\php_curl.dll' - The specified procedure could not be found.\r\n in Unknown on line 0

However I have checked my PATH variable and the PHP directory is listed, the ext folder is set correctly and php_curl.dll exists in the folder.

I have reinstalled VC++ redistributes to ensure that there are no issues there.

During my checking I have found that all of the following DLLs are present when opening them from run (to test they can be found from the PATH variable):

I am unsure of what dependencies that php_curl could have, if you could provide any suggestions then this would be greatly appreciated.

More system info:

Upvotes: 1

Views: 676

Answers (2)

flapjack
flapjack

Reputation: 87

tl;dr: Make sure the PHP installation directory is in the system path.

I had a similar problem. Apache's error log said something like "can't find module php_curl.dll", even though it was in the PHP ext/ directory and other extension DLLs in that directory seemed to be loading fine.

I wrote a PHP script with nothing but a call to phpinfo() and placed it in the document root. When I accessed that page through a browser (ie, via Apache), cURL didn't show up. But if I executed that same script from the command line, cURL did show up.

I think the Apache error message is misleading; I think what is really going on is that Apache can't find files that php_curl.dll depend on. These DLLs seem to be located in the PHP installation directory. The PHP directory was in my user path, but not the system path. That's why everything worked when I ran PHP as a user process.

Add the PHP installation directory to the system path, then re-start the Apache. Machine reboot does not seem necessary.

Upvotes: 0

Miiru
Miiru

Reputation: 26

I have the same issue. I was not able to find the root cause for this error but I managed to find a fix. Simply copied php_curl.dll from previous version of php I used - 7.1.2 x86 Thread Save. Everything works fine for now.

Upvotes: 1

Related Questions