简体   繁体   English

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

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

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: 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" extension_dir ="F:\PHP\ext"

And later, I have:后来,我有:

extension=php_curl.dll扩展=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:文件F:\PHP\ext\php_curl.dll存在,但是当我尝试运行任何 PHP 脚本时,我在错误日志中得到了这个:

PHP Warning: PHP Startup: Unable to load dynamic library 'F:\PHP\ext \php_curl.dll' - The specified module could not be found. PHP 警告:PHP 启动:无法加载动态库 'F:\PHP\ext \php_curl.dll' - 找不到指定的模块。 in Unknown on line 0在第 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 specified module could not be found ,但这有点误导——不是它找不到php_curl.dll ,而是它找不到php_curl.dll需要的模块。 The 2 DLLs it requires are libeay32.dll and SSLeay32.dll .它需要的 2 个 DLL 是libeay32.dllSSLeay32.dll

So, you have to put those 2 DLLs somewhere in your PATH (eg, C:\\Windows\\system32 ).因此,您必须将这 2 个 DLL 放在 PATH 中的某个位置(例如, 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.所以我下载了最新版本的 PHP 的 Windows zip,其中包括所有必需的 DLL。 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.我没有重新安装 PHP,我只是将“ext”文件夹中的所有 DLL 复制到我的 PHP 扩展文件夹(如php.ini中的extension_dir变量中指定的),并且我复制了libeay32.dllSSLeay32.dll的版本SSLeay32.dll从 PHP 下载到我的 System32 目录。

I also did an iisreset, but I don't know if that was necessary.我也做了一个 iisreset,但我不知道是否有必要。

libeay32.dll and ssleay32.dll have to be path-accessible for php_curl.dll to work correctly. libeay32.dllssleay32.dll必须是路径可访问的, php_curl.dll才能正常工作。

In Control Panel -> Search -> Advanced System Settings and use the button Environment Variables .Control Panel -> Search -> Advanced System Settings 中并使用按钮Environment Variables

Under System Variables find Path add the c:/php folder (or whatever path) and restart Apache.System Variables find Path添加c:/php文件夹(或任何路径)并重新启动 Apache。

A tip is to use the WAMP-installer .一个提示是使用WAMP-installer Everything just works.一切正常。 It's not IIS though - so if it is important - you should ignore my advice.虽然它不是 IIS - 所以如果它很重要 - 你应该忽略我的建议。 ;) ;)

EDIT: I saw that you found the solution so I voted it up.编辑:我看到你找到了解决方案,所以我投票了。 +1 +1

I keep having same problem although i did the suggestion above and many others suggested on the internet i get我一直有同样的问题,虽然我做了上面的建议,我得到了互联网上的许多其他建议

Sorry, but this plugin requires libcurl to be activated on your server.抱歉,此插件需要在您的服务器上激活 libcurl。

When i try to activate my plugin.当我尝试激活我的插件时。

Edited: I was using php 5.3.13 had win64 windows 7 and none of the soln was working for me.编辑:我使用的是 php 5.3.13 有 win64 windows 7 并且没有一个 soln 对我有用。

1.I had tried to copy the libeay32.dll SSLeay32.dll in windows\\system32 folder did not work 2. Edited and uncommented both php.ini files did not work 3. Activated php_curl in php extensions did not work 4. Copied and replaced several times the www.anindya.com version of php_curl.dll but seems i was downloading the wrong version of this. 1.我曾尝试复制 windows\\system32 文件夹中的 libeay32.dll SSLeay32.dll 不起作用 2. 编辑和取消注释两个 php.ini 文件都不起作用 3. 在 php 扩展中激活的 php_curl 不起作用 4. 复制并替换php_curl.dll 的 www.anindya.com版本的几次,但似乎我下载了错误的版本。 The version that worked for me was in Fixed curl extensions section the second file php_curl-5.3.13-VC9-x64对我有用的版本在第二个文件 php_curl-5.3.13-VC9-x64 的固定卷曲扩展部分

Hope this will help anyone else希望这会帮助其他人

Faced this problem when I upgraded the php in UwAmp to 7.2.*.当我将 UwAmp 中的 php 升级到 7.2.* 时遇到了这个问题。 The only solution that worked for me was to download the latest version of apache at the time (Apache/2.4.37 (Win32)) and replace the one that came with UwAmp.唯一对我有用的解决方案是下载当时最新版本的 apache(Apache/2.4.37 (Win32))并替换 UwAmp 附带的那个。 That also involved editing the sample httpd.conf to produce an httpd_uwamp.conf file.这还涉及编辑示例 httpd.conf 以生成 httpd_uwamp.conf 文件。 UwAmp needs this template to then generate the actual httpd.conf when it starts up. UwAmp 需要这个模板,然后在它启动时生成实际的 httpd.conf。 All other suggestions above didn't resolve it for me unfortunately.不幸的是,上面的所有其他建议都没有为我解决。 Also note that as of OpenSSL 1.1, libeay32.dll and ssleay32.dll are no longer required (see http://php.net/manual/en/curl.installation.php )另请注意,从 OpenSSL 1.1 开始,不再需要 libeay32.dll 和 ssleay32.dll(请参阅http://php.net/manual/en/curl.installation.php

In your case just add "F:\PHP\ext" to Environment Variable "path".在您的情况下,只需将“F:\PHP\ext”添加到环境变量“path”。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 php_pthreads.dll-找不到指定的模块。 - php_pthreads.dll - The specified module could not be found.? 无法加载动态库 'parallel'(尝试:C:\\xampp\\php\\ext\\parallel(找不到指定的模块。) - Unable to load dynamic library 'parallel' (tried: C:\xampp\php\ext\parallel ( The specified module could not be found.) PHP:找不到指定的过程。 在第0行的Unknown中 - PHP : The specified procedure could not be found. in Unknown on line 0 在 laragon 上为 php 7.2 安装 php-decimal 扩展,找不到指定的模块。 扩展小数点不存在 - Installing php-decimal extension on laragon for php 7.2, The specified module could not be found. Extension decimal does not exist php中的dll“无法找到指定的模块” - dll in php “the specified module could not be found” Apache,PHP,找不到指定的模块 - Apache, PHP, The specified module could not be found 无法加载动态库'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - 找不到指定的模块。 在第0行的未知中 - Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found. in Unknown on line 0 OCI8 + PHP7.1 + Windows10:找不到指定的模块 - OCI8 + PHP7.1 + Windows10: The specified module could not be found PHP警告:PHP启动:无法加载动态库' - 找不到指定的过程。 在第0行的未知中 - PHP Warning: PHP Startup: Unable to load dynamic library '- The specified procedure could not be found. in Unknown on line 0 php:加载oracle驱动程序给出错误“无法加载动态库 - 找不到指定的过程。” - php: loading oracle driver gives error “Unable to load dynamic library - The specified procedure could not be found.”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM