简体   繁体   English

xdebug没有显示在`php -m`的输出中,但是显示在phpinfo中

[英]xdebug not showing in output of `php -m` but shows in phpinfo

I have the opposite problem as described in this users question . 我有与此用户问题中所述相反的问题。

If I execute php -m then there is no xdebug showing up, but it shows in the phpinfo. 如果我执行php -m ,则不会显示xdebug,但它会显示在phpinfo中。

phpinfo

According to the documentation it should show up twice if I execute php -m , once under [PHP Modules] and once under [Zend Modules] . 根据文档,如果我执行php -m ,它将显示两次,一次在[PHP Modules] ,一次在[Zend Modules]

But php -m | grep -i xdebug 但是php -m | grep -i xdebug php -m | grep -i xdebug returns nothing. php -m | grep -i xdebug返回任何内容。

This is my setup in the php.ini: 这是我在php.ini中的设置:

[XDebug]
zend_extension='/usr/lib64/php5/extensions/xdebug.so'
xdebug.remote_enable=on
xdebug.remote_handler="dbgp"
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"
xdebug.renite_enable = 1
xdebug.max_nesting_level = 1000
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = '/var/log'

[PHP]

;;;;;;;;;;;;;;;;;;;
; About php.ini   ;
;;;;;;;;;;;;;;;;;;;

...

I figured out that xdebug works nevertheless, but I am still curious. 我发现xdebug仍然可以工作,但是我仍然很好奇。

Depending on your environment, CLI configuration is usually in a different file. 根据您的环境,CLI配置通常位于不同的文件中。 Try to see if you have /etc/php/XYZ/cli/php.ini file and add this at the top: 尝试查看是否具有/etc/php/XYZ/cli/php.ini文件,并将其添加到顶部:

zend_extension='/usr/lib64/php5/extensions/xdebug.so'

Replace the path with the path of your xdebug.so file. 将路径替换为xdebug.so文件的路径。

You can find it out by executing locate xdebug.so 您可以通过执行locate xdebug.so找出来

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM