ubuntu下安装php的curl扩展

我选用了下面网址提供的第一个方法,成功

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

posted on 2013-01-03 16:18  zhanghw0354  阅读(450)  评论(0编辑  收藏  举报