安裝 xdebug centos 5.8

來源:互聯網
上載者:User

標籤:


這個命令安裝最好了。但是我的伺服器上 PHP 的版本是 5.3 還不能升級沒辦法。只能不用了。
/php5/bin/pecl install xdebug


下載原始碼。
http://xdebug.org/files/xdebug-2.3.2.tgz
也下載錯了。太新了,不支援對應的 PHP 版本。
重新下載


wget http://xdebug.org/files/xdebug-2.2.7.tgz
cd /root/
tar zxvf xdebug-XDEBUG_2_2_7.tar.gz
cd xdebug-XDEBUG_2_2_7


執行一下。查看一下版本
/php5/bin/phpize
=============================
[[email protected] xdebug-2.2.7]# /php5/bin/phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
=============================


進行編譯:
./configure --enable-xdebug --with-php-config=/php5/bin/php-config
上面命令注意最後的參數,要寫到檔案 php-config 的位置。
make
cp modules/xdebug.so /php5/modules/xdebug.so
這裡複製到那裡,設定檔就寫那裡。


如果上面有編譯不過的地方,就安裝一下,以下命令:
yum install php-devel
yum install php-pear


編輯設定檔:
vim /php5/php.ini


[Xdebug]
zend_extension_ts = "/php/modules/xdebug.so"
zend_extension = "/php/modules/xdebug.so"
xdebug.auto_trace = on
xdebug.auto_profile = on
xdebug.collect_params = on
xdebug.collect_return = on
xdebug.profiler_enable = on
xdebug.trace_output_dir = "/tmp"
xdebug.profiler_output_dir = "/tmp"
xdebug.dump.GET = *
xdebug.dump.POST = *
xdebug.dump.COOKIE = *
xdebug.dump.SESSION = *
xdebug.var_display_max_data = 4056
xdebug.var_display_max_depth = 5
加中檔案最尾


重啟 WEB 伺服器。
/nginx.sh restart

安裝 xdebug centos 5.8

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.