linux下php动态添加扩展

安装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

搞定!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章