系统环境: RHEL6 X86_64; PHP5.3.2;安装 X D EBUG-2.1.0 ; 安装路径皆为默认
立即学习“PHP免费学习笔记(深入)”;
RHEL6的光碟是不带php-devel,需要下载安装[注1]。
rpm -ivh php-devel-5.3.2-6.el6.x86_64.rpm
tar -xvzf xdebug-2.1.0
立即学习“PHP免费学习笔记(深入)”;
cd xdebug-2.1.0
phpize
./configure --enable-xdebug --with-php-config=/usr/lib64/php-config
make
mkdir /usr/lib64/php/xdebug
cp /modules/xdebug.so /usr/lib64/php/xdebug
vim /etc/php.ini
立即学习“PHP免费学习笔记(深入)”;
#---Begin Edit---添加下面代码在最后
[Xdebug]
zend_extension = "/usr/lib64/php/xdebug/xdebug.so"
xdebug.profiler_enable = on
xdebug.trace_output_dir = "/usr/lib64/php/xdebug"
xdebug.profiler_output_dir = "/usr/lib64/php/xdebug"
xdebug.remote_enable = on
xdebug.remote_handler = dbgp
xdebug.remote_host = localhost
xdebug.remote_port = 9005
#---End Edit---
注1:如果不安装phpize将不能使用。
立即学习“PHP免费学习笔记(深入)”;
立即学习“PHP免费学习笔记(深入)”;
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号