您的位置:首页 > 理论基础 > 计算机网络

php安装http扩展(sudo apt-get install)

2012-03-28 22:02 681 查看
转自:http://www.xwuxin.com/?p=1575点击打开链接

"

上面新需求准备采用kohana,kohana是很早之前从ci分出来的一个框架,轻量,没有像ci那样去兼容php4。kohana需要安装http扩展,在Ubuntu上折腾了下,遇到些问题记录在此:

在安装好pecl的前提下:

sudo apt-get install libcurl3-openssl-dev

sudo apt-get install libmagic-dev

如果你不安装libcurl3-openssl-dev,直接用pecl install pecl-http方式安装http扩展,它会给你报以下error:

checking for curl/curl.h… not found

configure: error: could not find curl/curl.h

ERROR: ‘/tmp/pear/temp/pecl_http/configure –with-http-curl-requests –with-http-zlib-compression=1 –with-http-magic-mime=no –with-http-shared-deps’ failed

configure: error: could not find magic.h

ERROR: `/tmp/pear/temp/pecl_http/configure –with-http-curl-requests –with-http-zlib-compression –with-http-magic-mime –with-http-shared-deps’ failed

接着安装http扩展:

sudo pecl install pecl_http

一路回车之后,完成安装。

打开php.ini,加上extension=http.so,重启你的web服务器即可。

"

注:安装pecl:
$ sudo apt-get install php5-dev php-pear
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐