Skip to content

조회 수 8738 추천 수 0 댓글 1
?

단축키

Prev이전 문서

Next다음 문서

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

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
mbstring 모듈 올리기 

설치 시 ./configure 옵션에 --enable=mbstring 추가 하는 방법 (php 재설치 해야함) 과
재설치 하지 않고 확장 모듈 올리는 방법 두가지 방법이 있다.



1. 모듈 만들기

php 설치 경로 (/usr/local/php) /bin 의 phpize, php-config 확인

php 소스 경로 (/usr/local/src/apm/php) 의 ext 디렉토리에서 모듈을 만들 수 있고,
그 디렉토리에 mbstring 이 있음을 확인 할 수 있으며, 필요로 하는 모듈 소스가 /ext 안에 없을 경우
인터넷에서 소스를 구해 같은 방법으로 올리면 된다.


반드시 mbstring 디렉토리 안에서 실행해야 된다.

]# cd /usr/local/src/apm/php/ext/mbstring

]# /usr/local/php/bin/phpize
Configuring for:
PHP Api Version:        20020918
Zend Module Api No:      20020429
Zend Extension Api No:  20050606

 mysqli 컴파일 할때는 아래 옵션
./configure --with-php-config=/usr/local/php/bin/php-config --with-mysqli=/usr/local/mysql/bin/mysql_config


]# ./configure --with-php-config=/usr/local/php/bin/php-config
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc
checking for C compiler default output file name... a.out
.
.
.
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking whether -lc should be explicitly linked in... no
creating libtool
configure: creating ./config.status
config.status: creating config.h

]# make
.
.
.
creating mbstring.la
(cd .libs && rm -f mbstring.la && ln -s ../mbstring.la mbstring.la)
/bin/sh /usr/local/src/apm/php/ext/mbstring/libtool --mode=install cp ./mbstring.la /usr/local/src/apm/php/ext/mbstring/modules
cp ./.libs/mbstring.so /usr/local/src/apm/php/ext/mbstring/modules/mbstring.so
cp ./.libs/mbstring.lai /usr/local/src/apm/php/ext/mbstring/modules/mbstring.la
PATH="$PATH:/sbin" ldconfig -n /usr/local/src/apm/php/ext/mbstring/modules
----------------------------------------------------------------------
Libraries have been installed in:
  /usr/local/src/apm/php/ext/mbstring/modules  <- 만들어진 모듈이 있는 디렉토리
 
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
  - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
    during execution
  - add LIBDIR to the `LD_RUN_PATH' environment variable
    during linking
  - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
  - have your system administrator add LIBDIR to `/etc/ld.so.conf'
 
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 
Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).


2. 설정 파일 수정 하기

만들어진 모듈을 적당한 위치로 옮긴 후 php.ini 파일을 수정 해 주면 된다.

ex) 
/usr/local/php 에 module 디렉토리를 만들고 그 디렉토리에 만들어진 모듈을 복사.

]# cd /usr/local/php/module

]# cp /usr/local/src/apm/php/ext/mbstring/module/mbstring.so ./

]# cd /usr/local/php/lib <- php.ini 파일이 있는 곳

]# vi php.ini

428 줄의 extension_dir = "./" 부분을 모듈이 있는 디렉토리로 설정
(이 부분의 설정이 제대로 이루어지지 않으면 적용이 안됨)

extension_dir = "/usr/local/php/module"

그 아래 추가 extension=mbstring.so <- 모듈명 정확히 써야 됨.

]# service httpd restart


@@@@ 유의사항 @@@@
extension_dir="./"    부분에서 2개이상의 모듈을 동시에 사용할 경우 각 모듈명간 ;(세미콜론)으로 구분짓고 제일 마직막 모듈에는 ; (세미콜론)을 생략 한다.
  • ?
    까끙 2009.01.19 12:54
    phpize 는 ./configure 를 할수 있게 config 파일을 생성해줌~ 푸힛

  1. Ubuntu 에서 PHP Screw 컴파일시 에러날 때

    Date2013.09.07 ByADMINPLAY Views6974
    Read More
  2. php.ini 설명

    Date2009.06.04 ByADMINPLAY Views7385
    Read More
  3. PHP 업로드 용량 제한 변경하기 #2

    Date2008.11.03 ByADMINPLAY Views7448
    Read More
  4. 세션관련 설명입니다

    Date2009.05.13 ByADMINPLAY Views7625
    Read More
  5. PHP 업로드 용량 제한 변경하기 #1

    Date2008.11.03 ByADMINPLAY Views8033
    Read More
  6. php 버전 정보 숨기기

    Date2009.06.04 ByADMINPLAY Views8133
    Read More
  7. Warning: main(): URL file-access is disabled in the se...

    Date2009.06.04 ByADMINPLAY Views8237
    Read More
  8. call undefined mysql connect 에러 발생시 해결 방안

    Date2009.06.04 ByADMINPLAY Views8432
    Read More
  9. php 재 컴파일 없이 필요한 모듈 올리기

    Date2008.12.14 ByADMINPLAY Views8738
    Read More
  10. DB 관리 : phpmyadmin

    Date2008.12.10 ByADMINPLAY Views8780
    Read More
  11. php mysql에 insert시 싱글쿼츠(홑따옴표) 입력 처리 (mag...

    Date2013.09.07 ByADMINPLAY Views8911
    Read More
  12. call undefined mysql connect 와 같은 mysql 라이브러리...

    Date2009.06.04 ByADMINPLAY Views9016
    Read More
  13. Fedora 및 CentOs 에서 Imap PHP 연동시 에러가날때

    Date2009.06.01 ByADMINPLAY Views9061
    Read More
  14. DBA: Could not find necessary header file 발생시 대처법

    Date2009.06.04 ByADMINPLAY Views9251
    Read More
  15. [php모듈] php 소스 암호화 하기 - php_screw-1.5

    Date2013.03.26 ByADMINPLAY Views9531
    Read More
  16. freetds 설치 (php로 외부 MS-SQL 서버에 접속 사용하기)

    Date2009.05.18 ByADMINPLAY Views9597
    Read More
  17. php.ini 옵션 한글설명

    Date2009.07.18 ByADMINPLAY Views9628
    Read More
  18. PHPMyAdmin 오류조치법 Your PHP MySQL library version ...

    Date2009.01.20 ByADMINPLAY Views10023
    Read More
  19. ini_set("allow_url_fopen", 1); -- allow_url_fopen = Of...

    Date2009.06.01 ByADMINPLAY Views10126
    Read More
  20. php 명령어 이용 phpinfo 확인

    Date2009.06.04 ByADMINPLAY Views10238
    Read More
Board Pagination Prev 1 2 3 Next
/ 3

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234