[英]XDebug installed but doesn't show in phpinfo() and doesn't work
[英]XDebug installed but it doesn't show in phpinfo()
我想打印phpinfo()函數以查看是否安裝了某些模塊:
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);
命令的結果:
php -m | grep -i xdebug
xdebug
Xdebug
和
php -v
PHP 5.6.37 (cli) (built: Sep 9 2018 15:55:18)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans
with Suhosin v0.9.38, Copyright (c) 2007-2015, by SektionEins GmbH
我添加了以下擴展名和xdebugger參數:( /usr/local/php56/lib/php.ini
)
[Zend]
zend_extension=/usr/local/lib/ioncube/ioncube_loader_lin_5.6.so
zend_extension_ts=/usr/local/lib/ioncube/ioncube_loader_lin_5.6_ts.so
zend_extension=/usr/local/lsws/lsphp5/lib/php/modules/xdebug.so
[xdebug]
;Remote settings
xdebug.remote_autostart=on
.
.
.
您看到沒有錯誤,但是我不能使用xdebug。
這顯示了我的php.ini文件是:
php -i | grep "Loaded Conf"
Loaded Configuration File => /usr/local/php56/lib/php.ini
通過http來檢查phpinfo()中的php.ini,可能您的機器上有兩個php-cli和apache或nginx等php。
重新安裝,重新編譯和放置軟鏈接可解決此問題:
ln -s /usr/local/php56/lib/php.ini /usr/local/lsws/lsphp5/lib/php.ini
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.