您的位置:首页 > 运维架构 > Apache

Ubuntu+PHP+Apache+Xdebug 使用方法

2013-05-23 17:27 281 查看
下面是我建立xdebug的全过程(简)

1、预备

sudo apt-get install php5
sudo apt-get install php5-dev php5-cli
sudo apt-get install php5-xsl
sudo apt-get install perl
sudo pecl install xdebug  //顺便说一下,装redis 也可一类似
sudo apt-get install php-pear
...


2、在/etc/php5/apache/php.ini 里面添加如下

zend_extension="/usr/lib/php5/20090626+lfs/xdebug.so"
xdebug.profiler_enable=On
xdebug.trace_output_dir="/data/log/xdebug"
xdebug.profiler_output_dir="/data/log/xdebug"
xdebug.default_enable=On
xdebug.collect_params=On
xdebug.remote_connect_back=On
xdebug.remote_host=10.254.58.32
xdebug.remote_port=8888
xdebug.remote_enable=On
xdebug.remote_handler=dbgp
xdebug.remote_log="/data/log/xdebug/remote.log"
xdebug.remote_req=req
xdebug.auto_trace=Off
;xdebug.remote_autostart=On
xdebug.show_exception_trace=0
xdebug.collect_vars=On
xdebug.collect_return=On
xdebug.var_display_max_depth=15
xdebug.show_local_vars=1
xdebug.dump_undefined=1


3、重启

sudo /etc/init.d/apache2 restart


4、查看 phpinfo

5、完毕
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: