dongroufan6846 2012-05-01 23:40
浏览 62
已采纳

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

I have tried to install xdebug on my ubuntu server machine and it's not working. The reason I know it's not working is that the output of var_dump is not colorized, nor can I connect to it using netbeans.

I followed the tailored instructions on how to install xdebug on

http://xdebug.org/wizard.php

Here is what the output of my phpinfo analysis was:

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

The name of the file that wizard recommended was xdebug-2.1.4.tgz

The output of phpize was

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

My phpinfo now does show xdebug installed, here is how it looks like:

enter image description here

Here is what I have in my 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

The output of lsb_release -a on my computer is

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

PHP version shown on phpinfo is 5.3.6-13ubuntu3.6

  • 写回答

1条回答 默认 最新

  • duaabhuv188411 2012-05-02 09:14
    关注

    For the colours, you probably want to set html_errors=1 in php.ini as well.

    As for the netbeans issue (you really should not combine issues in one question!), which IP addresses do your machine running PHP, and which IP address does your machine running netbeans have? The xdebug.remote_host setting should contain the IP address of the one running netbeans. The remote log file that you're generating should have connection attempts in it too.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 关于#python#的问题:自动化测试