【问题标题】:xdebug not showing up in php infoxdebug 未显示在 php 信息中
【发布时间】:2016-06-07 02:50:50
【问题描述】:

php.ini

zend_extension="/Applications/mampstack-5.6.18-0/php/lib/php/extensions/xdebug.so"
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir=/tmp

我按照https://xdebug.org/wizard.php中的所有步骤进行操作

Xdebug installed: no
Server API: Apache 2.0 Handler
Windows: no
Zend Server: no
PHP Version: 5.6.18
Zend API nr: 220131226
PHP API nr: 20131226
Debug Build: no
Thread Safe Build: no
Configuration File Path: /bitnami/mampstack-osx-x64/output/php/lib
Configuration File: /Applications/mampstack-5.6.18-0/php/etc/php.ini
Extensions directory: /Applications/mampstack-5.6.18-0/php/lib/php/extensions



Download xdebug-2.4.0rc4.tgz
Unpack the downloaded file with tar -xvzf xdebug-2.4.0rc4.tgz
Run: cd xdebug-2.4.0rc4
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:      20131226
Zend Extension Api No:   220131226
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 /Applications/mampstack-5.6.18-0/php/lib/php/extensions
Edit /Applications/mampstack-5.6.18-0/php/etc/php.ini and add the line
zend_extension = /Applications/mampstack-5.6.18-0/php/lib/php/extensions/xdebug.so
Restart the webserver

php -v

PHP 5.5.30 (cli)(构建时间:2015 年 10 月 23 日 17:21:45)版权所有 (c) 1997-2015 PHP Group Zend Engine v2.5.0,版权所有 (c) 1998-2015 Zend 技术

但还是没有出现

【问题讨论】:

  • @fico7489 重启后没有变化

标签: php mamp xdebug osx-elcapitan bitnami


【解决方案1】:

这里是 Bitnami 开发者,

MAMP 5.6.18 包括 Xdebug。但是,它有一个小问题,我们正在努力为下一个版本修复。

无论如何,您可以按照以下步骤操作:

brew install autoconf automake
/Applications/mampstack-5.6.18-0/use_mampstack
curl > 'xdebug-2.4.0RC4.tgz' https://pecl.php.net/get/xdebug-2.4.0RC4.tgz
tar -zxf xdebug-2.4.0RC4.tgz
cd xdebug-2.4.0RC4/
export PHP_AUTOCONF=/usr/local/bin/autoconf
export PHP_PREFIX=/Applications/mampstack-5.6.18-0/php
phpize
./configure --enable-xdebug
make
sudo make install

那么,你只需要在/Applications/mampstack-5.6.18-0/php/etc/php.ini中添加如下代码:

;[XDebug]
;; Only Zend OR (!) XDebug
zend_extension="/Applications/mampstack-5.6.18-0/php/lib/php/extensions/xdebug.so"
;xdebug.remote_enable=true
;xdebug.remote_host=127.0.0.1
;xdebug.remote_port=9000
;xdebug.remote_handler=dbgp
;xdebug.profiler_enable=1
;xdebug.profiler_output_dir=/tmp

重启服务:

/Applications/mampstack-5.6.18-0/ctlscript.sh restart

你可以执行php -m | grep xdebug来检查它。

希望对你有帮助。

【讨论】:

  • 我会努力的,非常感谢!
【解决方案2】:

这里也是同样的问题。我一直在尝试数百种选项并下载旧版本的 php 解决了我的问题,所以如果您找不到更好的解决方法,那么也许这也会对您有所帮助。祝你好运。

【讨论】:

    猜你喜欢
    • 2017-07-07
    • 1970-01-01
    • 1970-01-01
    • 2015-01-07
    • 2018-03-18
    • 1970-01-01
    • 1970-01-01
    • 2023-03-27
    • 1970-01-01
    相关资源
    最近更新 更多