调用未定义的函数curl_init()-使用WAMP [英] Call to undefined function curl_init() - with WAMP

查看:82
本文介绍了调用未定义的函数curl_init()-使用WAMP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使cUrl正常工作,但我感到很困惑.

I'm trying to get cUrl to work, and I'm stumped.

我没有注释php.ini文件中的extension=php_curl.dll,并检查了php_curl.dllextension_dir指向的目录中是否存在.我还检查了Apache目录中的php.ini是否正确.

I've uncommented extension=php_curl.dll in the php.ini file and checked that php_curl.dll exists in the directory that extension_dir points to. I've also checked that the php.ini in the Apache directory is right.

我已将libcurl.dll复制到Windows/System32,Windows/SysWOW64和wamp\bin\php\php5.4.3

I've copied the libcurl.dll's to Windows/System32, Windows/SysWOW64 and wamp\bin\php\php5.4.3

我每次都重新启动服务.

And I've restarted the services every time.

我仍然得到Fatal error: Call to undefined function curl_init().当我运行phpInfo()时,卷曲没有显示.但是当我查看WAMP菜单PHP-> PHP扩展php_curl时,确实有一个选中标记.

And still I get the Fatal error: Call to undefined function curl_init(). Curl doesn't show up when I run a phpInfo(). But when I look in the WAMP-menu PHP->PHP extensions php_curl does has a checkmark.

有任何提示吗?

@Daniel_M:加载的ini是Apache目录中的ini,并且extension=php_curl.dll已取消注释,并且extension_dir确实指向php_curl.dll(和libcurl.dll)所在的php/php5.4.3/ext目录.

@Daniel_M: The loaded ini is the one in the Apache directory, and extension=php_curl.dll has been uncommented, and extension_dir does point to the php/php5.4.3/ext directory where the php_curl.dll (and libcurl.dll) are located.

@ficuscr:我已经在各处复制了libcurl.dll v.7.27.0.我应该放在哪里?

@ficuscr: I've copied the libcurl.dll v.7.27.0 all over the place. Where should I place it?

通常:如果在PHP > PHP Extensions menu中未选中php_curl,则致命错误发生在以下位置: SCREAM: Error suppression ignored for.选中php_curl时不会发生这种情况.两种情况下的致命错误消息都是相同的.线索?

In general: When php_curl is unchecked in the PHP > PHP Extensions menu, the fatal error is preceeded by: SCREAM: Error suppression ignored for. This doesn't happen when php_curl is checked. The fatal error message is the same in either case. A clue?

推荐答案

WAMP 2.2带有错误的cURL扩展名.您应该从以下链接下载固定文件:
http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/.然后将文件 php_curl.dll 替换为/php5.4.3/ext/.

WAMP 2.2 comes with a wrong cURL extension. You should download the fixed file from the following link:
http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/. Then replace the file php_curl.dll into /php5.4.3/ext/.

这篇关于调用未定义的函数curl_init()-使用WAMP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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