PHP上的PHP / cURL安装:“找不到指定的模块”。 [英] PHP / cURL on Windows install: "The specified module could not be found."

查看:1307
本文介绍了PHP上的PHP / cURL安装:“找不到指定的模块”。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 2000 Server与IIS 5上运行PHP 5.2.3。我试图
获得cURL工作,所以在我的 php.ini 文件中,我有这个行:


extension_dir =F:\PHP\ext


后来,我有:


extension = php_curl.dll


文件 F:\PHP\ext\php_curl.dll 存在,但是当我尝试运行任何PHP
脚本,我在错误日志中得到这个:


PHP警告:PHP启动:无法加载动态库'F:\PHP \ext
\php_curl.dll' - 找不到指定的模块。
在未知的第0行



解决方案

问题解决! 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.

这篇关于PHP上的PHP / cURL安装:“找不到指定的模块”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆