Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP / cURL on Windows install: "The specified module could not be found."

Tags:

php

curl

windows

I'm running PHP 5.2.3 on Windows 2000 Server with IIS 5. I'm trying to get cURL working, so in my php.ini file, I have this line:

extension_dir ="F:\PHP\ext"

And later, I have:

extension=php_curl.dll

The file F:\PHP\ext\php_curl.dll exists, but when I try to run any PHP script, I get this in the error log:

PHP Warning: PHP Startup: Unable to load dynamic library 'F:\PHP\ext \php_curl.dll' - The specified module could not be found. in Unknown on line 0

like image 949
Derek Kurth Avatar asked Aug 15 '08 15:08

Derek Kurth


2 Answers

Problem solved!

Although the error message said The specified module could not be found, this is a little misleading -- it's not that it couldn't find php_curl.dll, but rather it couldn't find a module that php_curl.dll required. The 2 DLLs it requires are libeay32.dll and SSLeay32.dll.

So, you have to put those 2 DLLs somewhere in your PATH (e.g., C:\Windows\system32). That's all there is to it.

However, even that did not work for me initially. So I downloaded the Windows zip of the latest version of PHP, which includes all the necessary DLLs. I didn't reinstall PHP, I just copied all of the DLLs in the "ext" folder to my PHP extensions folder (as specified in the extension_dir variable in php.ini), and I copied the versions of libeay32.dll and SSLeay32.dll from the PHP download into my System32 directory.

I also did an iisreset, but I don't know if that was necessary.

like image 69
Derek Kurth Avatar answered Oct 21 '22 13:10

Derek Kurth


libeay32.dll and ssleay32.dll have to be path-accessible for php_curl.dll to work correctly.

In Control Panel -> Search -> Advanced System Settings and use the button Environment Variables.

Under System Variables find Path add the c:/php folder (or whatever path) and restart Apache.

like image 15
elQuique Avatar answered Oct 21 '22 13:10

elQuique