溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

php 中xdebug安裝

發(fā)布時間:2020-04-11 02:30:06 來源:網(wǎng)絡 閱讀:540 作者:13962104417 欄目:web開發(fā)

實驗環(huán)境CentOS


phpinfo()

顯示

PHP Version 5.3.3

去官網(wǎng)http://www.xdebug.org/對應下載

xdebug-2.2.5






linux下解壓xdebug包。

1、進入xdebug,在這個目錄下先運行php目錄下面的bin/phpize;


我的機子,運行phpize出錯

[root@localhost xdebug-2.2.5]# phpize
-bash: phpize: command not found



安裝phpize

phpize是屬于php-devel的內容

yum install php-devel -y
[root@localhost xdebug-2.2.5]# phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626


2、在運行

[root@localhost xdebug-2.2.5]#./configure --enable-xdebug 
[root@localhost xdebug-2.2.5]#make

好了,編譯結束了。

[root@localhost xdebug-2.2.5]# ll modules/
total 660
-rw-r--r--. 1 root root    923 Oct 17 06:19 xdebug.la
-rwxr-xr-x. 1 root root 668885 Oct 17 06:19 xdebug.so



這是時候會在xdebug的目錄下生成 目錄modules,目錄下有xdebug.so文件,把xdebug.so復制到你想放的目錄。


3. 編輯php.ini文件


再php的配置文件后面加上

zend_extension = "/路徑/xdebug.so"

如下:

zend_extension="/home/samba/test/xdebug-2.2.5/modules/xdebug.so"
xdebug.profiler_enable = on
xdebug.default_enable = on
xdebug.trace_output_dir="/tmp/xdebug"
xdebug.trace_output_name = trace.%c.%p
xdebug.profiler_output_dir="/tmp/xdebug"
xdebug.profiler_output_name="cachegrind.out.%s"



[root@localhost xdebug-2.2.5]#service httpd restart


phpinfo()

顯示


This program makes use of the Zend Scripting Language Engine:

Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

    with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans


php 中xdebug安裝



或者

[root@localhost etc]# php -m |grep debug
xdebug
Xdebug






向AI問一下細節(jié)

免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內容。

AI