安装了 Xdebug 但我无法在 phpinfo 中找到它
Installed Xdebug but I cant find it in phpinfo
我已经安装了 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
时returns:
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 pecl install xdebug
并按照其说明进行操作。我尝试过以多种方式编译 xdebug,而 PECL 是唯一可以使用的方式
尝试从这里安装
sudo apt-get install php-xdebug
您可以在此处找到 xdebug.ini(针对 php 7.2 版)
vi /etc/php/7.2/mods-available/xdebug.ini //zend_extension=xdebug.so
您可以在该参考文献中获取详细信息 link http://www.dieuwe.com/blog/xdebug-ubuntu-1604-php7
我已经安装了 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
时returns:
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 pecl install xdebug
并按照其说明进行操作。我尝试过以多种方式编译 xdebug,而 PECL 是唯一可以使用的方式
尝试从这里安装
sudo apt-get install php-xdebug
您可以在此处找到 xdebug.ini(针对 php 7.2 版)
vi /etc/php/7.2/mods-available/xdebug.ini //zend_extension=xdebug.so
您可以在该参考文献中获取详细信息 link http://www.dieuwe.com/blog/xdebug-ubuntu-1604-php7