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

搞定!

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