linux + php 安装curl
作者:忆茶篍
linux+php安装curl
进入安装原php的源码目录,
cdext
cdcurl
/usr/local/php5/bin/phpize在源码目录里执行此行代码才会有用此目录为php的安装目录
./configure--with-php-config=/usr/local/php5/bin/php-config--with-curl=/usr/local/curl
执行此行代码可能会报错
configure:error:Pleasereinstallthelibcurldistribution
checkingforcURLindefaultpath...notfound
configure:error:Pleasereinstallthelibcurldistribution-
easy.hshouldbein/include/curl/
其实就是curl的dev包没有安装,解决方案:
终端下
#yum-yinstallcurl-devel
然后
make&makeinstall
就会在
/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/
下生成curl.so的文件。
修改php.ini就好了
extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/curl.so
#/usr/local/apache2/bin/apachectlstart
到此成功了,在phpinfo中可以看到CURL的项。
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。