dsbruqxgt820011351 2017-03-08 16:28
浏览 147

Ubuntu上的XAMPP:不同的PHP版本

UPDATE 16.03.2017:

I checked the log and found the following error:

Xdebug requires Zend Engine API version 320151012. The Zend Engine API version 320160303 which is installed, is newer. Contact Derick Rethans at xdebug.org/docs/faq#api for a later version of Xdebug

I understand that I need to compile xdebug using another PHP header but how do I compile this with PHP7? Also, I am already using the latest xdebug version, which is 2.5.1

I installed xdebug on ElementaryOS together with XAMPP (PHP7) and PHPStorm. When I enter "php -v" in the terminal, I get the following output

PHP 7.0.15-0ubuntu0.16.04.4 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.15-0ubuntu0.16.04.4, Copyright (c) 1999-2017, by Zend Technologies
    with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans

In addition, "php --ini" writes:

Configuration File (php.ini) Path: /etc/php/7.0/cli
Loaded Configuration File:         /etc/php/7.0/cli/php.ini
Scan for additional .ini files in: /etc/php/7.0/cli/conf.d
Additional .ini files parsed:      /etc/php/7.0/cli/conf.d/10-mysqlnd.ini,
                                   /etc/php/7.0/cli/conf.d/10-opcache.ini,

But when running "phpinfo()" in the browser (hosted by XAMPP) the output does not contain "xdebug" and the php installation seems to be another:

Configuration File (php.ini) Path     /opt/lampp/etc
Loaded Configuration File             /opt/lampp/etc/php.ini 

In both php.ini files, I added the following but still no luck:

;[XDebug]
zend_extension="/usr/lib/php/20151012/xdebug.so"
xdebug.remote_enable=On
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000

I checked that xdebug.so exists at this path. It has the following authorizations:

-rw-r--r-- 1 root root 1225696 Mär 14  2016 /usr/lib/php/20151012/xdebug.so

I have no clue what to try next - maybe someone could give me a hint!

Cheers!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
    • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料