xdebug 配置显示 php 的错误版本

xdebug configure showing wrong version of php

我需要在centos 6上配置xdebug目录。

当我在 xdebug 中 运行./configure 准备我的 make 文件时,我得到:

configure: error: not supported. Need a PHP version >= 7.0.0 and < 7.4.0 (found 5.6.30)

然而

php -v

给我:

PHP 7.1.30 (cli) (built: Jul 23 2019 18:46:30) ( NTS )

wtf

然而,在仔细研究之后,我发现 centos 附带了一个名为 php-devel 的软件包,默认为 5.6。这可能是问题所在吗?如果是这样,我该如何解决? yum 搜索给了我这个包:ea-php71-php-devel.x86_64 但我猜它已经安装了...

其中 php 的输出:

/usr/local/bin/php

并且 phpize

/usr/local/bin/phpize

phpize给出输出:

PHP Api Version:         20131106
Zend Module Api No:      20131226
Zend Extension Api No:   220131226

应该是:

Zend Module Api No:      20160303
Zend Extension Api No:   20160303

而且我注意到 运行ning

php-config --version

给我:5.6.30

这可能是问题所在,但我该如何解决?我查看了xdebug faqs,看到:"If it doesn't match up, and perhaps the wrong "phpize"path is found binary, you can 运行 configure as follows":

/full/path/to/php/bin/phpize
./configure --with-php-config=/full/path/to/php/bin/php-config

但我不明白.../full/path/to/php/bin/phpize 是二进制文件的路径,不是吗 - 那么您如何配置它?

cpanel 路径 php-devel bin

/opt/cpanel/ea-php__VERSION__/root/usr/bin/

对于包 ea-php71-php-devel.x86_64 7.1.30-4.4.1.cpanel

cd /full/path/to/module/xdebug
/opt/cpanel/ea-php71/root/usr/bin/phpize && ./configure --with-php-config=/opt/cpanel/ea-php71/root/usr/bin/php-config