在ubuntu服务器5.3.6-13ubuntu3.6上安装xdebug 2.1.4

时间:2012-05-01 23:40:54

标签: php ubuntu xdebug

我曾尝试在我的ubuntu服务器上安装xdebug但它无法正常工作。我知道它不起作用的原因是var_dump的输出没有着色,也不能使用netbeans连接到它。

我遵循了有关如何在

上安装xdebug的定制说明
http://xdebug.org/wizard.php

以下是我的phpinfo分析的输出结果:

Xdebug installed: no
Server API: Apache 2.0 Handler
Windows: no
Zend Server: no
PHP Version: 5.3.6-13
Zend API nr: 220090626
PHP API nr: 20090626
Debug Build: no
Thread Safe Build: no
Configuration File Path: /etc/php5/apache2
Configuration File: /etc/php5/apache2/php.ini
Extensions directory: /usr/lib/php5/20090626

向导推荐的文件名是xdebug-2.1.4.tgz

phpize的输出是

Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626

我的phpinfo现在确实显示了xdebug,这是它的样子:

enter image description here

这是我在php.ini中的内容

zend_extension = /usr/lib/php5/20090626/xdebug.so
xdebug.profiler_output_dir = "/var/log/apache2/xdebug"
xdebug.profiler_output_name = "cachegrind.out.%p"
xdebug.profiler_enable =1
xdebug.profiler_append=1
xdebug.extended_info=1
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
xdebug.remote_mode=req
xdebug.remote_host=192.168.2.13
xdebug.remote_port=9000
;xdebug.idekey=xdebug
xdebug.idekey=netbeans-xdebug
xdebug.remote_connect_back=1
xdebug.remote_log="/var/log/apache2/xdebug_remote.log"
xdebug.show_exception_trace=0
xdebug.show_local_vars=9
xdebug.show_mem_delta=0

我电脑上lsb_release -a的输出是

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 11.10
Release:        11.10
Codename:       oneiric

phpinfo上显示的PHP版本是5.3.6-13ubuntu3.6

1 个答案:

答案 0 :(得分:4)

对于颜色,您可能也想在php.ini中设置html_errors=1

至于netbeans问题(你真的不应该在一个问题中结合问题!),哪些IP地址使你的机器运行PHP,你的机器运行netbeans的IP地址有哪些? xdebug.remote_host设置应包含运行netbeans的IP地址。您正在生成的远程日志文件也应该在其中进行连接尝试。

相关问题