doomm4711 2019-03-28 09:38
浏览 599

已安装Xdebug但我无法在phpinfo中找到它

I've installed Xdebug but cant find it in phpinfo() output.

I am operating according to 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.

When I execute php -m|grep xdebug it returns:

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

I don't know what's the zend_post_startup_cb; I can't find any information in website.

  • 写回答

2条回答 默认 最新

  • drqn5418 2019-04-26 14:55
    关注

    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

    评论

报告相同问题?

悬赏问题

  • ¥15 identifier of an instance of 类 was altered from xx to xx错误
  • ¥100 反编译微信小游戏求指导
  • ¥15 docker模式webrtc-streamer 无法播放公网rtsp
  • ¥15 学不会递归,理解不了汉诺塔参数变化
  • ¥30 软件自定义无线电该怎样使用
  • ¥15 R语言mediation包做中介分析,直接效应和间接效应都很小,为什么?
  • ¥15 Jenkins+k8s部署slave节点offline
  • ¥15 如何实现从tello无人机上获取实时传输的视频流,然后将获取的视频通过yolov5进行检测
  • ¥15 WPF使用Canvas绘制矢量图问题
  • ¥15 用三极管设计一个单管共射放大电路