日期:2014-05-16  浏览次数:20707 次

Linux 安装php扩展curl

安装php扩展curl的时候

[root@localhost curl]# /home/web/php/bin/phpize

[root@localhost curl]# ./configure --with-php-config=/home/web/php/bin/php-config

报错如下

checking for cURL in default path... not found
configure: error: Please reinstall the libcurl distribution -
easy.h should be in /include/curl/

?

解决办法:

# yum -y install curl-devel

?

然继续,done

[root@localhost curl]#make

[root@localhost curl]# cd modules/
[root@localhost modules]# ls
curl.la? curl.so

?

接着把curl.so拷贝到php.ini里配置的extention_dir目录里,同时配置

extention=curl.so

?

重启apache

搞定!