Centos 下php安裝配置xdebug擴展

一、下載安裝xdebugjavascript

獲取xdebugphp

wget http://www.xdebug.org/files/xdebug-2.3.3.tgz 

解壓html

tar zxvf xdebug-2.3.3.tgz

進入解壓模塊java

cd xdebug-2.3.3

創建外掛模塊服務器

/usr/local/php/bin/phpize

配置xdebugpost

./configure --enable-xdebug --with-php-config=/usr/local/php/bin/php-config

編譯安裝spa

make && make install

按照上述步驟安裝,若是沒有什麼特殊狀況的話安裝會順利的進行,最後出現以下結果表示安裝成功.net

  1.  
    Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/
  2.  
    +----------------------------------------------------------------------+
  3.  
    | |
  4.  
    | INSTALLATION INSTRUCTIONS |
  5.  
    | ========================= |
  6.  
    | |
  7.  
    | See http: //xdebug.org/install.php#configure-php for instructions |
  8.  
    | on how to enable Xdebug for PHP. |
  9.  
    | |
  10.  
    | Documentation is available online as well: |
  11.  
    | - A list of all settings: http://xdebug.org/docs-settings.php |
  12.  
    | - A list of all functions: http://xdebug.org/docs-functions.php |
  13.  
    | - Profiling instructions: http: //xdebug.org/docs-profiling2.php |
  14.  
    | - Remote debugging: http: //xdebug.org/docs-debugger.php |
  15.  
    | |
  16.  
    | |
  17.  
    | NOTE: Please disregard the message |
  18.  
    | You should add "extension=xdebug.so" to php.ini |
  19.  
    | that is emitted by the PECL installer. This does not work for |
  20.  
    | Xdebug. |
  21.  
    | |
  22.  
    +----------------------------------------------------------------------+

二、配置php支持xdebugdebug

打開php.ini調試

vi /usr/local/php/etc/php.ini

添加配置信息

  1.  
    zend_extension = /usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so
  2.  
    [Xdebug]
  3.  
    xdebug.remote_enable = 1 //開啓遠程調試
  4.  
    xdebug.remote_host = 192.168.17.90 //遠程ip地址抑或是本機地址
  5.  
    xdebug.remote_port = 9000 //遠程IDE服務器監聽端口
  6.  
    xdebug.remote_handler=DBGP //使用的協議

php腳本使用phpinfo()查看php的配置以下圖,說明配置成功

相關文章
相關標籤/搜索