Php remote debug with xdebug on Linux

阅读更多
1.compile & install xdebug
1).download & extract
http://xdebug.org/download.php
#wget http://xdebug.org/files/xdebug-2.1.1.tgz

#tar xzvf xdebug-2.1.1.tgz

2).compiling
#cd xdebug-2.1.1

#/usr/local/php/bin/phpize
find your phpize

# ./configure --with-php-config=/usr/local/php/bin/php-config
find your php-config

#make

#make install
.
.
.
Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/
system will tell you where is the so file was installed.

3).config
#vi /usr/local/php/etc/php.ini
find your php.ini, then add conf as below

zend_extension="/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so"
xdebug.profiler_enable=Off
xdebug.default_enable=On
xdebug.remote_enable=1
xdebug.remote_port=9001
xdebug.remote_handler=dbgp
xdebug.remote_host=115.206.222.189
remote_host means your debugging client address, and the XDEBUG side is SERVER.

write a phpinfo.php file to test whether the XDEBUG was installed.

2.iptables
#vi /etc/sysconfig/iptables
add config as below
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 9001 -j ACCEPT

#/sbin/service iptables restart

你可能感兴趣的:(PHP,Linux,Zend,J#)