gpt4 book ai didi

php - 安装了 Xdebug 但我无法在 phpinfo 中找到它

转载 作者:行者123 更新时间:2023-12-04 01:11:24 25 4
gpt4 key购买 nike

我已经安装了 Xdebug,但无法在 phpinfo() 输出中找到它。

我是按照https://xdebug.org/wizard.php操作的:

量身定制的安装说明总结

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

说明

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

重启php和nginx,还是不行。

当我执行 php -m|grep xdebug 时,它返回:

Failed loading /usr/lib/php/20180731/xdebug.so: /usr/lib/php/2017/xdebug.so: undefined symbol: zend_post_startup_cb

我不知道zend_post_startup_cb是什么;我在网站上找不到任何信息。

最佳答案

尝试从这里安装

sudo apt-get install php-xdebug

您可以在这里找到 xdebug.ini(适用于 php 7.2 版)

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

enter image description here enter image description here


您可以在此引用链接上获取详细信息 http://www.dieuwe.com/blog/xdebug-ubuntu-1604-php7

关于php - 安装了 Xdebug 但我无法在 phpinfo 中找到它,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55394330/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com