简体   繁体   English

Ubuntu 16.07 php7.0和xdebug

[英]Ubuntu 16.07 php7.0 and xdebug

Recently I have learned how too use xdebug and I want to try and install it to the php.ini for apache. 最近,我学习了如何使用xdebug,并且想尝试将其安装到php.ini中以获取Apache。

I managed to install php7.0 as apache module and NOT to run it via php-fpm. 我设法将php7.0安装为apache模块,而不是通过php-fpm运行它。

As I have seen the following configuration works for php 5.x versions: 如我所见,以下配置适用于php 5.x版本:

[PHP]
extension=/usr/lib/php5/20131226/mailparse.so
zend_extension=/usr/lib/php5/20131226/xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp 
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1 
xdebug.remote_port=9000
xdebug.max_nesting_level=300

But it may need some tweak to work for php 7.0 . 但是它可能需要一些调整才能适用于php 7.0。 Do you know how to tweak it? 你知道如何调整吗?

In the end my configuration on file /etc/php5/apache2/php.ini is: 最后,我在文件/etc/php5/apache2/php.ini配置是:

zend_extension=/usr/lib/php/20151012/xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.max_nesting_level=300

And worked like a charm. 并像魅力一样工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM