Skip to content

2009.12.31 05:17

PEC HTTP Setup

조회 수 15925 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

PECL 의 확장 Module 인 PECL HTTP 를 설치하는 방법을 설명한다.

이 확장 Module 을 설치하면,

HttpUtil, HttpMessage, HttpRequest, HttpRequestPool, HttpRequestDataShare, HttpDeflateStream, HttpInflateStream, HttpResponse, HttpQueryString

위와 같은 함수들을 사용할 수 있다.

위 함수의 예제는 아직 존재하지 않은 듯 하며, PHP Version 5.1 이후 부터 설치 및 사용이 가능하다.

http://php.net/http

위 주소가 Documenut 및 Example 의 주소이다.

 

1. PECL_HTTP 를 Download 한다.

http://pecl.php.net/package/pecl_http

위 주소에서 일단 Download 한 후,

Linux 의 PHP Module 이 있는 Folder로 옮겨준다.

(애초에 Module이 있는 Folder로 Download 하면 편하다.)

2. 압축을 해제한다.

$tar -xvzf pecl_http-1.6.2.tgz

................. (압축이 마구 풀림)

$phpize (이 실행이 안되시는 분은 제일 아래의 참조를 봐주시길 바란다.)

................. (Zend Optimizer 하고 쿵짝한다.)

$./configure

.................

$make && make install

.................

이렇게만 하면 설치가 완료된 것이다.

하지만 아직 끝이 아니다.

3. php.ini에 extension을 추가한다.

$vi /etc/php.ini

;;;;;;;;;;;;;;;;;;;;;;;;;;

; Dynamic Extensions ;

;;;;;;;;;;;;;;;;;;;;;;;;;;

;

; if you wish to have an extension loaded automatically, use the following

; syntax;

.........................

; extension_dir directive adove.

extension=http.so <-- 이부분 추가

4. 마지막으로 httpd Service Restart

$service httpd restart

확인법은 phpinfo()를 뿌렸을 시에 "HTTP"란 곳을 찾아서 확인해 보면 나와 있을 것이다.

Version 과 Class 등이.

 

※ phpize가 실행이 안되시는 분들은 Yum Extender 를 사용하거나 하셔서

php-devel 를 설치하여 주시길 바란다.

php-devel 은 PHP 확장 Module 을 Build 하는 Package 라고 생각하시면 되겠다.

 

=================================

 

초간단 설치법

wget http://pecl.php.net/get/pecl_http-1.6.3.tgz
tar zxvf pecl_http-1.6.3.tgz
cd pecl_http-1.6.3
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --enable-http --enable-shared --enable-static --with-http-shared-deps --with-http-curl-requests --with-http-curl-libevent --with-http-zlib-compression --with-http-magic-mime
make && make install
완료시 Installing shared extensions 에있는거 확인해볼것

php.ini에
extension_dir="/usr/local/php/lib/php/extensions/no-debug-zts-20060613"
extension=http.so
2줄 추가
아파치 재시작 후
/usr/local/php/bin/php -m | grep http 해서 http 가 나와야 정상

 


  1. oracle10g + php5.2.11 error [OCIEnvNlsCreate() failed]

    Date2010.02.24 ByADMINPLAY Views71252
    Read More
  2. PHP 버전 확인하기

    Date2008.12.23 ByADMINPLAY Views22278
    Read More
  3. configure: error: utf8_mime2text() has new signature, ...

    Date2010.05.18 ByADMINPLAY Views21860
    Read More
  4. Warning: Unknown: open(, O_RDWR) failed: No such file ...

    Date2010.01.29 ByADMINPLAY Views19757
    Read More
  5. register_globals 에 따른 서버 변수형 변환

    Date2010.01.09 ByADMINPLAY Views17862
    Read More
  6. PHP.INI에서의 세션 관련설명

    Date2009.10.19 ByADMINPLAY Views17504
    Read More
  7. Maximum execution time of 30 seconds exceeded

    Date2009.09.28 ByADMINPLAY Views17374
    Read More
  8. Fatal error: Call to undefined function domxml_open_mem()

    Date2009.12.31 ByADMINPLAY Views17338
    Read More
  9. pear 1.9 업그레이드 및 패치설치

    Date2009.12.31 ByADMINPLAY Views17310
    Read More
  10. php세션정리

    Date2009.09.19 ByADMINPLAY Views17180
    Read More
  11. PHP FreeTDS 사용 (MS-SQL)

    Date2010.01.05 ByADMINPLAY Views16932
    Read More
  12. php에서 curl 설치하기

    Date2009.06.01 ByADMINPLAY Views16843
    Read More
  13. Warning: flock(): supplied argument is not a valid str...

    Date2009.09.09 ByADMINPLAY Views16754
    Read More
  14. PHPMyAdmin - blowfish_secret 해결방법

    Date2009.09.08 ByADMINPLAY Views16482
    Read More
  15. php컴파일에러(flex) configure: error: cannot find out...

    Date2009.08.08 ByADMINPLAY Views16096
    Read More
  16. PEC HTTP Setup

    Date2009.12.31 ByADMINPLAY Views15925
    Read More
  17. register_globals = off 란?

    Date2010.01.09 ByADMINPLAY Views15537
    Read More
  18. 4.1.0이상 php 버전에서 register_globals = Off 일때 기...

    Date2010.01.09 ByADMINPLAY Views15425
    Read More
  19. PHP - eAccelerator 설치

    Date2009.08.03 ByADMINPLAY Views15003
    Read More
  20. [PHP] 정규 표현식 정리

    Date2009.06.29 ByADMINPLAY Views14896
    Read More
Board Pagination Prev 1 2 3 Next
/ 3

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234