php安装了扩展提示undefined

安装curl扩展后仍然提示如下错误:

Call to undefined function curl_init()

使用一下语句 输出NO

echo function_exists('curl_init') ? 'YES' : 'No';

参考解决方案

http://stackoverflow.com/questions/6382539/call-to-undefined-function-curl-init

之后重启了cgi,fpm,nginx 解决,语句:

killall -HUP php5-cgi

spawn-fcgi -a 127.0.0.1 -p 9000 -C 10 -u www-data -f /usr/bin/php-cgi

重启 php5-fpm

sudo service php5-fpm restart

重启nginx:

nginx -s reload

原文地址:https://www.cnblogs.com/8765h/p/5378034.html