- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我一直在搜寻我能找到的所有资源,但一无所获。当我启动调试 session 时,我在 NetBeans 6.9 中收到可怕的“等待连接”消息。经过大量阅读,大多数人都能够让 phpinfo() 显示它加载了 xdebug 模块。我不是这样。
我使用这个调用通过SVN下载了源
svn co svn://svn.xdebug.org/svn/xdebug/xdebug/trunk xdebug
我切换到 xdebug 目录,然后在源上运行 phpize
sudo /Applications/MAMP/bin/php5/bin/phpize
Password:
grep: /Applications/MAMP/bin/php5/include/php/main/php.h: No such file or directory
grep: /Applications/MAMP/bin/php5/include/php/Zend/zend_modules.h: No such file or directory
grep: /Applications/MAMP/bin/php5/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
一个大胖子罢了!引用的目录甚至不存在。因此,我假设我在这一点之外所做的任何 .ini 调整都是无用的。如果我执行 whereis php,我会在/usr/bin 中找到它。这是操作系统预加载的默认 php。我不想要那个。我需要使用随 MAMP 安装的 php。我无法相信让这个东西工作是多么令人沮丧!
作为记录,我的 php.ini 中的 xdebug 部分如下所示:
[xdebug]
; xdebug config for Linux and Mac OS X
zend_extension="/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.idekey="netbeans-xdebug"
xdebug.profiler_enable=1
xdebug.profiler_output_name=xdebug.cachegrind-out.%s.%p
xdebug.remote_log="/Applications/MAMP/logs/xdebug_log.log"
这是使 xdebug 工作的许多不同尝试的大杂烩。所以,我不知道哪些片段有效。
我任由专家摆布,因为我显然不是他们中的一员。我现在完全不知道如何继续。
提前致谢。
最佳答案
要在 MAMP 目录而不是系统路径中使用 phpize,您应该将 MAMP 的 PHP 二进制文件目录添加到 $PATH。下面我使用的是 MAMP 1.9.1,它提供 PHP 5.2 和 PHP 5.3。我们假设您正在为 PHP 5.3 进行编译。
打开或创建~/.bash_profile
并放入以下内容:
#Add MAMP binaries to path
export PATH="/Applications/MAMP/Library/bin:/Applications/MAMP/bin/php5.3/bin:$PATH"
您可能还需要将 /Applications/MAMP/bin/php5.3/bin
中的二进制文件更改为可执行文件:
chmod 755 /Applications/MAMP/bin/php5.3/bin/pear
chmod 755 /Applications/MAMP/bin/php5.3/bin/peardev
chmod 755 /Applications/MAMP/bin/php5.3/bin/pecl
chmod 755 /Applications/MAMP/bin/php5.3/bin/phar
chmod 755 /Applications/MAMP/bin/php5.3/bin/phar.phar
chmod 755 /Applications/MAMP/bin/php5.3/bin/php
chmod 755 /Applications/MAMP/bin/php5.3/bin/php-config
chmod 755 /Applications/MAMP/bin/php5.3/bin/phpcov
chmod 755 /Applications/MAMP/bin/php5.3/bin/phpize
重新启动终端 session 以加载新的 $PATH。运行命令 which phpize
,它应该显示 /Applications/MAMP/bin/php5.3/bin/phpize
。如果不是,则您的 MAMP 目录中 phpize
的路径未加载到您的 $PATH 中。在终端中使用 echo $PATH
确保 /Applications/MAMP/bin/php5.3/bin
在 $PATH 中。
要编译 xDebug,您需要编译 PHP 时的头文件。这些在 DMG 的 MAMP 网站上可用,称为“MAMP 组件”:http://www.mamp.info/en/downloads/index.html
解压 MAMP 组件并将 MAMP_src
复制到您的桌面。解压 MAMP_src/php-5.3.2.tar.gz
并将其移动到 php-config --includes
中的包含路径中,该路径应包含 /Applications/MAMP/bin/php5.3/include/php
.
cd ~/Desktop/MAMP_src
tar -xvzf php-5.3.2.tar.gz
mkdir -p /Applications/MAMP/bin/php5.3/include
mv php-5.3.2/ /Applications/MAMP/bin/php5.3/include/php
您现在可以在 xDebug 源目录中运行 phpize
。
关于xdebug 未加载。 apache 重启后在 phpinfo() 中找不到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3144485/
例如,我有一个父类Author: class Author { String name static hasMany = [ fiction: Book,
代码如下: dojo.query(subNav.navClass).forEach(function(node, index, arr){ if(dojo.style(node, 'd
我有一个带有 Id 和姓名的学生表和一个带有 Id 和 friend Id 的 Friends 表。我想加入这两个表并找到学生的 friend 。 例如,Ashley 的 friend 是 Saman
我通过互联网浏览,但仍未找到问题的答案。应该很容易: class Parent { String name Child child } 当我有一个 child 对象时,如何获得它的 paren
我正在尝试创建一个以 Firebase 作为我的后端的社交应用。现在我正面临如何(在哪里?)找到 friend 功能的问题。 我有每个用户的邮件地址。 我可以访问用户的电话也预订。 在传统的后端中,我
我主要想澄清以下几点: 1。有人告诉我,在 iOS 5 及以下版本中,如果您使用 Game Center 设置多人游戏,则“查找 Facebook 好友”(如与好友争夺战)的功能不是内置的,因此您需要
关于redis docker镜像ENTRYPOINT脚本 docker-entrypoint.sh : #!/bin/sh set -e # first arg is `-f` or `--some-
我是一名优秀的程序员,十分优秀!