关于ubuntu:运行xdebug向导,但仍然对php版本感到困惑

Ran the xdebug wizard but still have php version confusion

当我运行php -v时,我得到

PHP 5.6.32-1+ubuntu16.04.1+deb.sury.org+1 (cli)

所以然后我转到xdebug向导,粘贴php -i的输出,按照步骤进行

当我运行phpize时,我得到

Cannot find build files at '/usr/local/lib/php/build'. Please check your PHP installation

所以我做了phpize5.6并得到了

PHP Api Version: 20131106

Zend Module Api No: 20131226

Zend Extension Api No: 220131226

与向导匹配。 现在,当我运行./configure时,我得到

checking Check for supported PHP versions... configure: error: not supported. Need a PHP version >= 5.5.0 and < 7.2.0 (found 5.3.10)

但是,如果我像./configure --with-php-config=php-config5.6那样运行
我可以结束向导。 它说

Run: cp modules/xdebug.so /usr/lib/php/20131226

Edit /etc/php/5.6/cli/php.ini and add the line
zend_extension = /usr/lib/php/20131226/xdebug.so

但是现在我明白了

Failed loading /usr/lib/php/20131226/xdebug.so: /usr/lib/php/20131226/xdebug.so: undefined symbol: zend_pass_function

因此,看来php安装有问题。 它似乎使用5.3,但php -i显示5.6。 您对这是什么有什么想法,我如何最好地解决呢?


好的,所以我首先在/usr中搜索5.3.10解决了这个问题

尽管我使用的是系统安装的php版本,而不是phpbrew版本,但这使我看到我曾经使用过phpbrew。

切换到phpbrew版本5.6(而不是系统5.6)解决了该错误。

将来,我可以按照以下建议删除phpbrew并返回到常规php。