1. source install
shell> cd /gsp/install/xdebug-2.0.0
shell> ./configure --enable-xdebug
shell> make
shell> cd module
shell> cp cp xdebug.so /gsp/server/php5/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so
2. php설정
vi /gsp/server/php5/lib/php.ini
zend_extension=/gsp/server/php5/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = /gsp/log/xdebug
3. 아파치 restart
4. phpinfo에서 xdebug확인
--------------------------------------------------------------------------------------------------
xampp에 xdebug 컴파일해서 추가하기
1. 먼저 xampp를 설치
1) XAMPP Linux 1.6.1를 http://www.apachefriends.org/download.php?xampp-linux-1.6.1.tar.gz에서 다운 ,
tar xvfz xampp-linux-1.6.1.tar.gz -C /opt로 설치
2) Development package를 http://www.apachefriends.org/download.php?xampp-linux-devel-1.6.1.tar.gz에서 다운,
tar xvfz xampp-linux-devel-1.6.1.tar.gz -C /opt 로 설치하기 전 /opt/lampp/include를 백업하고 설치
사이트::http://www.apachefriends.org/en/xampp-linux.html
/opt/lampp/bin 를 PATH에 추가
xdebug는 php accelerator나 다른 디버거와 같이 사용할 수 없으므로 php.ini에서 지움.
Zend Optimizer, DBG, APC, APD, eaaccelerator.. etc
2. xdebug INSTALLATION FROM SOURCE
(참조: http://xdebug.org/install.php#debugclient)
최신버전 다운:: http://xdebug.org/link.php?url=xdebug200beta5
Xdebug from CVS
cvs -d :pserver:srmread@cvs.xdebug.org:/repository login
CVS password: srmread
cvs -d :pserver:srmread@cvs.xdebug.org:/repository co xdebug
This will checkout the latest development version which is currently 2.0dev.
3. COMPILING
php.net에서 설치된 php소스를 다운 받아서
/usr/src에 tar zxf php-4.4.6.tar.gz로압축을 풀고,
$mv php-4.4.6 php
$cp /usr/src/php /opt/lampp/include/php
$cd /opt/lampp/include/php
$./configure
$make
여기서 make install은 하지 않음!!
$cd /usr/src
$wget http://xdebug.org/link.php?url=xdebug200rc3
$tar -xzf xdebug-2.0.x.tgz.
$cd xdebug*
$phpize (이 명령이 안먹히면 /opt/lampp/bin/phpize).
$ ./configure --enable-xdebug --with-php-config=/opt/lampp/bin/php-config if php-config
여기서 실패시 다음과 같이 나오면:
../configure: line 1960: syntax error near unexpected token
`PHP_NEW_EXTENSION(xdebug,'
../configure: line 1960: ` PHP_NEW_EXTENSION(xdebug, xdebug.c
xdebug_code_coverage.c xdebug_com.c xdebug_handler_gdb.c
xdebug_handler_php3.c xdebug_handlers.c xdebug_llist.c xdebug_hash.c
xdebug_profiler.c xdebug_superglobals.c xdebug_var.c usefulstuff.c,
$ext_shared)'
---> php버전이 xdebug와 맞지 않음.
다음 오류가 나오면:
configure: line 1145: PHP_INIT_BUILD_SYSTEM: command not found
configure: line 1151: syntax error near unexpected token `config.nice'
configure: line 1151: `PHP_CONFIG_NICE(config.nice)'
--> autotools를 업그레이드 하라 (autoconf, automake and libtool) or install the known working versions: autoconf-2.13, automake-1.5
and libtool-1.4.3.
$make
(메세지에서 아래 사항을 확인하여 버전이 맞는 가 확인)
4.4.x 20020918 20020429 20050606 2.0.0-rc1 or cvs
5.1.x 20041225 20050922 220051025 2.0.0-rc1 or cvs
5.2.x 20041225 20060613 220060519 2.0.0-rc1 or cvs
$cp modules/xdebug.so /opt/lampp/lib/php/extensions/no-debug-non-zts-20020429/xdebug.so
(xampp의 extensions는 이곳임. 가능한 이곳에 저장하는 것이 뒤에 머리가 덜 아픔)
4. CONFIGURE PHP TO USE XDEBUG
php.ini에 xdebug을 추가함으로 설치 끝
1) CLI, CGI or Apache 1.3 module을 사용하는 non-threaded use of PHP인 경우:
zend_extension=/opt/lampp/lib/php/extensions/no-debug-non-zts-20020429/xdebug.so
2) Apache 2에 MPM or the the ISAPI module을 설치한 threaded usage of PHP인 경우
zend_extension_ts=/opt/lampp/lib/php/extensions/no-debug-non-zts-20020429/xdebug.so
3) 중요:php를 자기가 컴파일로 설치 한 경우 zend_extension_debug=.를 사용하려면 --enable-debug옵션을 사용할 것
4) 아파치 재시작
/opt/lampp/lampp restart
5) xdebug로드 확인
phpinfo.php페이지를 열어서 xdebug를 확인
DEBUGCLIENT INSTALLATION
Unpack the Xdebug source tarball and issue the following commands:
$ cd debugclient
$ ./configure --with-libedit
$ make
# make install
This will install the debugclient binary in /usr/local/bin unless you don't have libedit installed on your system. You can either install it, or leave
out the "--with-libedit" option to configure. Debian 'unstable' users can install the library with apt-get install libedit-dev libedit2.
If the configure script can not find libedit and you are sure you have (and it's headers) installed correctly and you get link errors like the
following in your configure.log:
/usr/lib64/libedit.so: undefined reference to `tgetnum'
/usr/lib64/libedit.so: undefined reference to `tgoto'
/usr/lib64/libedit.so: undefined reference to `tgetflag'
/usr/lib64/libedit.so: undefined reference to `tputs'
/usr/lib64/libedit.so: undefined reference to `tgetent'
/usr/lib64/libedit.so: undefined reference to `tgetstr'
collect2: ld returned 1 exit status
you need to change your configure command to:
$ LDFLAGS=-lncurses ./configure --with-libedit
Run /opt/lampp/bin/phpize-x.x.x; use the version of phpize which corresponds to the version of PHP you want to install for.
--------------------------------------------------------------------------------------------------
http://www.ibm.com/developerworks/kr/library/os-php-fastapps2/index.html
댓글 없음:
댓글 쓰기