简体   繁体   English

安装了Xdebug,但是我在phpinfo中找不到它

[英]Installed Xdebug but I cant find it in phpinfo

I've installed Xdebug but cant find it in phpinfo() output. 我已经安装了Xdebug,但是在phpinfo()输出中找不到它。

I am operating according to https://xdebug.org/wizard.php : 我正在根据https://xdebug.org/wizard.php进行操作

Tailored Installation Instructions Summary 量身定制的安装说明摘要

Xdebug installed: no
Server API: FPM/FastCGI
Windows: no
Zend Server: no
PHP Version: 7.2.14-1
Zend API nr: 320170718
PHP API nr: 20170718
Debug Build: no
Thread Safe Build: no
OPcache Loaded: no
Configuration File Path: /etc/php/7.2/fpm
Configuration File: /etc/php/7.2/fpm/php.ini
Extensions directory: /usr/lib/php/20170718

Instructions 说明

Download xdebug-2.7.0.tgz
Install the pre-requisites for compiling PHP extensions.
On your Ubuntu system, install them with: apt-get install php-dev autoconf automake
Unpack the downloaded file with tar -xvzf xdebug-2.7.0.tgz
Run: cd xdebug-2.7.0

Run: phpize (See the FAQ if you don't have phpize).

As part of its output it should show:

Configuring for:
...
Zend Module Api No:      20170718
Zend Extension Api No:   320170718

If it does not, you are using the wrong phpize. Please follow this FAQ entry and skip the next step.
Run: ./configure
Run: make
Run: cp modules/xdebug.so /usr/lib/php/20170718
Edit /etc/php/7.2/fpm/php.ini and add the line
zend_extension = /usr/lib/php/20170718/xdebug.so
Restart the webserver

restart php and nginx, it still doesn't work. 重新启动PHP和nginx,它仍然无法正常工作。

When I execute php -m|grep xdebug it returns: 当我执行php -m|grep xdebug它返回:

Failed loading /usr/lib/php/20180731/xdebug.so: /usr/lib/php/2017/xdebug.so: undefined symbol: zend_post_startup_cb 无法加载/usr/lib/php/20180731/xdebug.so:/usr/lib/php/2017/xdebug.so:未定义的符号:zend_post_startup_cb

I don't know what's the zend_post_startup_cb ; 我不知道什么是zend_post_startup_cb ; I can't find any information in website. 我在网站上找不到任何信息。

Try to install from this 尝试从这里安装

sudo apt-get install php-xdebug

You may find the xdebug.ini here (for php version 7.2) 您可以在此处找到xdebug.ini(适用于php版本7.2)

vi /etc/php/7.2/mods-available/xdebug.ini //zend_extension=xdebug.so

在此处输入图片说明 在此处输入图片说明


You may get the details on this reference link http://www.dieuwe.com/blog/xdebug-ubuntu-1604-php7 您可以在此参考链接上获得详细信息, 网址为http://www.dieuwe.com/blog/xdebug-ubuntu-1604-php7

Try running: 尝试运行:

sudo pecl install xdebug

and follow its instructions. 并遵循其指示。 I have tried compiling xdebug in many ways and PECL was the only one it worked with 我尝试了多种编译xdebug的方法,而PECL是唯一与之兼容的方法

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

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