如何为php启用curl [英] How do I enable curl for php
本文介绍了如何为php启用curl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我通过DotDeb repo在Debian Wheezy上使用PHP-FPM的NGINX。
I'm using NGINX with PHP-FPM on Debian Wheezy via DotDeb repo.
这是我的php.ini文件中唯一的curl引用,我不知道我需要做什么。任何帮助是赞赏(它已经安装)
This is the only curl reference in my php.ini file and I'm not sure what I need to do. Any help is appreciated (it's already installed)
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
;curl.cainfo =
; Local Variables:
; tab-width: 4
; End:
推荐答案
检查您是否有 php5-curl
安装
dpkg -l | grep 'php5-curl'
如果未安装,
apt-get install php5-curl
确保 extension_dir
中的路径存在,并包含curl.so,如果没有,请更改为正确的路径。
Ensure the path in extension_dir
exists, and contains curl.so, if not, change to the correct path.
php -i | grep extension_dir
确保 / etc / php5 / mods-available / curl。 ini
存在并且已加载curl.so
Ensure the /etc/php5/mods-available/curl.ini
exists and has the curl.so loaded
; configuration for php CURL module
; priority=20
extension=curl.so
如果一切正常,请重新启动PHP-FPM
If everything is correct, restart PHP-FPM
/etc/init.d/php5-fpm restart
这篇关于如何为php启用curl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文