简体   繁体   English

curl在Wamp Server的PHP 5.4.3上不起作用

[英]curl is not working on php 5.4.3 of wamp server

I am using wamp server that installs php version 5.4.3 and I enabled curl extension, edited php.ini files to uncomment curl extensions lines but the problem is that when I try installing composer using console, it gives me a message that says "PHP Startup: unable to load dynamic library 'c:/wamp/bin/php/php5.4.3/ext/php_curl.dll", here is a screenshot of it 我正在使用安装了php版本5.4.3的wamp服务器,并且启用了curl扩展,已编辑php.ini文件以取消注释curl扩展行,但是问题是当我尝试使用控制台安装composer时,它显示了一条消息,内容为“ PHP启动:无法加载动态库'c:/wamp/bin/php/php5.4.3/ext/php_curl.dll”,这是它的屏幕截图

在此处输入图片说明

I followed instruction from different posts, downloaded curl versions from anindya but with no hope.. 我遵循了来自不同职位的说明,从anindya下载了curl版本,但没有希望。

Thanks in advance for your time 在此先感谢您的时间

Make sure your dll is compiled for the version of PHP you're using. 确保您的dll是针对您所使用的PHP版本进行编译的。 So one compiled for 5.5 won't work on 5.4, etc. There's a link in this question that's relevant 因此,为5.5编译的代码将无法在5.4等版本上使用。此问题中有一个与之相关的链接

PHP cURL not working - WAMP on Windows 7 64 bit PHP cURL不起作用-Windows 7 64位上的WAMP

It sounds like you are running a 32bit PHP and have downloaded a 64bit version of PHP_CURL. 听起来您正在运行32位PHP,并下载了64位版本的PHP_CURL。 That wont work 那行不通

This dll should come as standard with WAMP's PHP's. 该dll应该作为WAMP的PHP的标准配置。

Are you sure your problem was not that you forgot that when running PHP in CLI mode you have to configure it using the 'php.ini' file that lives in the c:\\wamp\\bin\\php\\php5.4.3\\php.ini 确定您的问题不是因为您忘记了以CLI模式运行PHP时,您必须使用c:\\​​ wamp \\ bin \\ php \\ php5.4.3 \\ php.ini中的“ php.ini”文件进行配置

So if you uncomment the php_curl extension line in that file it should have worked, until you downloaded the wrong curl dll. 因此,如果您取消注释该文件中的php_curl扩展名行,则应该起作用,直到您下载了错误的curl dll。

So get a 32bit curl dll for the correct version of php and try again. 因此,获取32位curl dll以获取正确版本的php,然后重试。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM