Home > php教程 > php手册 > body text

win7 64位 php环境开启curl服务Call to undefined function c

WBOY
Release: 2016-06-06 20:08:24
Original
1076 people have browsed it

无法使用curl_init(),一般情况问题可能出在没有去加载php的扩展文件php_curl.dll(windows操作系统),但是检查了一下系统配置,发现,环境下已经将php.ini文件里 ;extension=php_curl.dll 修改为 extension=php_curl.dll 但是还是报Call to undefined function

无法使用curl_init(),一般情况问题可能出在没有去加载php的扩展文件php_curl.dll(windows操作系统),但是检查了一下系统配置,发现,环境下已经将php.ini文件里

;extension=php_curl.dll

修改为

extension=php_curl.dll

但是还是报Call to undefined function curl_init()的错误,结合自己系统是window7 64位,可能问题出在此。

使用网友的方法:

如果还出现Call to undefined function curl_init()问题,先检查php.ini的extension_dir值是哪个目录,在那个目录下检查有无php_curl.dll,没有的话请下载php_curl.dll,再把php目录中的libeay32.dll和ssleay32.dll拷到c:\windows\system32里面,重启apache,OK!(Win7 64位拷贝libeay32.dll、ssleay32.dll两个文件到Windows目录下)

但是按照上面的方法操作完后仍然无法解决问题,无奈之下,查看日志。php未产生错误日志,apache有错误日志,经过检查发现了关于php_curl的错误信息,如下:

PHP Warning: ?PHP Startup: Unable to load dynamic library ‘d:/wamp/bin/php/php5.3.13/ext/php_curl.dll’ – \xd3\xa6\xd3\xc3\xb3\xcc\xd0\xf2\xce\xde\xb7\xa8\xc6\xf4\xb6\xaf\xa3\xac\xd2\xf2\xce\xaa\xd3\xa6\xd3\xc3\xb3\xcc\xd0\xf2\xb5\xc4\xb2\xa2\xd0\xd0\xc5\xe4\xd6\xc3\xb2\xbb\xd5\xfd\xc8\xb7\xa1\xa3\xd3\xd0\xb9\xd8\xcf\xea\xcf\xb8\xd0\xc5\xcf\xa2\xa3\xac\xc7\xeb\xb2\xce\xd4\xc4\xd3\xa6\xd3\xc3\xb3\xcc\xd0\xf2\xca\xc2\xbc\xfe\xc8\xd5\xd6\xbe\xa3\xac\xbb\xf2\xca\xb9\xd3\xc3\xc3\xfc\xc1\xee\xd0\xd0 sxstrace.exe \xb9\xa4\xbe\xdf\xa1\xa3\r\n in Unknown on line 0
Warning: ?PHP Startup: Unable to load dynamic library ‘d:/wamp/bin/php/php5.3.13/ext/php_curl.dll’ – 应用程序无法启动,因为应用程序的并行配置不正确。有关详细信息,请参阅应用程序事件日志,或使用命令行 sxstrace.exe 工具。
in Unknown on line 0

检查可能是由于当前php下的php_curl与64位系统不兼容导致的,于是根据php版本搜索64位下的php_curl.dll模块,装入php目录,覆盖原来的,重启服务器,问题解决了。

php版本:5.3.13 ? php_curl.dll下载

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!