我选用了下面网址提供的第一个方法,成功
http://unix-cd.com/vc/www/22/2010-08/16196.html
sudo apt-get install php5-curl
重启php-cgi
sudo /etc/init.d/php-fpm restart
编译安装的情况下:
cd /opt/build/php-5.2.13/ext/curl
sudo /usr/local/php/bin/phpize
sudo ./configure --with-php-config=/usr/local/php/bin/php-config
sudo make
sudo make install
修改php.ini的配置文件:
在extension_dir = "/usr/local/php/lib/php/extensions/"
下面添加:
extension = "curl.so"
sudo /etc/init.d/php-fpm restart