Centos 下php安裝配置xdebug擴充

不言
發布: 2023-03-29 16:38:02
原創
2480 人瀏覽過

這篇文章主要介紹了關於Centos 下php安裝配置xdebug擴展,有著一定的參考價值,現在分享給大家,有需要的朋友可以參考一下

1、下載安裝xdebug

取得xdebug

wget http://www.xdebug.org/files/xdebug-2.3.3.tgz
登入後複製

解壓縮

tar zxvf xdebug-2.3.3.tgz
登入後複製

進入解壓縮模組

cd xdebug-2.3.3
登入後複製

建立外掛模組

/usr/local/php/bin/phpize
登入後複製

配置xdebug

./configure –enable-xdebug –with-php-config=/usr/local/php/bin/php-config
登入後複製

編譯安裝

make && make install
登入後複製

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

Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/ +----------------------------------------------------------------------+ | | | INSTALLATION INSTRUCTIONS | | ========================= | | | | See http://xdebug.org/install.php#configure-php for instructions | | on how to enable Xdebug for PHP. | | | | Documentation is available online as well: | | - A list of all settings: http://xdebug.org/docs-settings.php | | - A list of all functions: http://xdebug.org/docs-functions.php | | - Profiling instructions: http://xdebug.org/docs-profiling2.php | | - Remote debugging: http://xdebug.org/docs-debugger.php | | | | | | NOTE: Please disregard the message | | You should add "extension=xdebug.so" to php.ini | | that is emitted by the PECL installer. This does not work for | | Xdebug. | | | +----------------------------------------------------------------------+
登入後複製

2、設定php支援xdebug

#開啟php.ini

vi /usr/local/php/etc/php.ini
登入後複製

新增設定資訊

zend_extension = /usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so [Xdebug] xdebug.remote_enable = 1 //开启远程调试 xdebug.remote_host = 192.168.17.90 //远程ip地址抑或是本机地址 xdebug.remote_port = 9000 //远程IDE服务器监听端口 xdebug.remote_handler=DBGP //使用的协议
登入後複製

php腳本使用phpinfo()查看php的設定如下圖,說明設定成功



#

以上是Centos 下php安裝配置xdebug擴充的詳細內容。更多資訊請關注PHP中文網其他相關文章!

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
作者最新文章
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!