[英]Call to undefined function curl_init() error with WAMP
I know that it's a very often asked problem, but I've tried all that I found and it still doesn't work. 我知道这是一个非常常见的问题,但是我已经尝试了所有发现的问题,但仍然无法正常工作。
I use WAMP 2.2 on Windows 7 (64 bits), and PHP 5.4.3. 我在Windows 7(64位)和PHP 5.4.3上使用WAMP 2.2。 When I call curl_init() in localhost, I've this error message :
当我在本地主机中调用curl_init()时,出现以下错误消息:
Call to undefined function curl_init()
What I've done : 我所做的:
And when I call php_info(), I cannot find curl... 当我调用php_info()时,我找不到卷曲...
Do as 4life suggests, but make sure you get the dll called php_curl-5.4.3-VC9-x64.zip 按照4life的建议进行操作,但请确保获得名为php_curl-5.4.3-VC9-x64.zip的dll。
do not try to use the one called php_curl-5.4.3-nts-VC9-x64.zip 不要尝试使用一个名为php_curl-5.4.3-nts-VC9-x64.zip的文件
WAMP requred Thread Safe dll's and the -nts- stands for Not-Thread_Safe WAMP需要线程安全dll,而-nts-代表Not-Thread_Safe
My late reply may be useful to someone. 我的延迟回复可能对某人有用。
During my experience of this issue, I found that none of the suggestions here nor on other forums resolved it. 在我对这个问题的经验中,我发现这里或其他论坛上的建议都没有解决它。
In my case I had installed the Wamp folder outside of the Program Files folder, however the php.ini file incorrectly referenced C:\\Program Files\\wamp
in multiple places. 就我而言,我已经在Program Files文件夹之外安装了Wamp 文件夹,但是php.ini文件在多个位置错误地引用了
C:\\Program Files\\wamp
。
Therefore, amending the path in php.ini in several places resolved my issue. 因此,在几个地方修改php.ini中的路径可以解决我的问题。
To achieve this: 为达到这个:
for me, I have wampp installed, none of the former worked. 对我来说,我已经安装了wampp,但前者都没有起作用。 Curl worked only when I clicked the wamp icon and enabled the curl module from there.
仅当我单击wamp图标并从此处启用curl模块时,Curl才起作用。 So left click wamp, choose php extensions and choose curl from there.
因此,左键单击沼泽,选择php扩展名并从那里选择curl。 good luck
祝好运
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.