且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PHP上的PHP / cURL安装:“找不到指定的模块”。

更新时间:2022-10-18 18:45:36

问题解决! b
$ b

虽然错误消息说找不到指定的模块,但这是有点误导 - 它不是找不到 php_curl.dll ,而是找不到需要 php_curl.dll 的模块。它需要的2个DLL是 libeay32.dll SSLeay32.dll



所以,你必须把这两个DLL放在PATH的某个地方(例如, C:\Windows \system32 )。这是所有的事情。



然而,即使这对我最初没有工作。所以我下载了最新版本的PHP的Windows zip,其中包括所有必要的DLL。我没有重新安装PHP,我只是将ext文件夹中的所有DLL复制到我的PHP扩展文件夹(如 extension_dir 变量 php.ini ),我复制了 libeay32.dll SSLeay32.dll 从PHP下载到我的System32目录。



我也做了一个iisreset,但我不知道这是否必要。


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

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.