dav*_*vez 3 php xdebug homestead
我已经安装了 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
Run Code Online (Sandbox Code Playgroud)
指示
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
Run Code Online (Sandbox Code Playgroud)
重启php和nginx,还是不行。
当我执行php -m|grep xdebug它返回:
加载 /usr/lib/php/20180731/xdebug.so 失败:/usr/lib/php/2017/xdebug.so:未定义符号:zend_post_startup_cb
我不知道是什么zend_post_startup_cb;我在网站上找不到任何信息。
尝试从这里安装
sudo apt-get install php-xdebug
Run Code Online (Sandbox Code Playgroud)
您可以在此处找到 xdebug.ini(适用于 php 7.2 版)
vi /etc/php/7.2/mods-available/xdebug.ini //zend_extension=xdebug.so
Run Code Online (Sandbox Code Playgroud)
您可以通过此参考链接获得详细信息http://www.dieuwe.com/blog/xdebug-ubuntu-1604-php7
| 归档时间: |
|
| 查看次数: |
2045 次 |
| 最近记录: |