【问题标题】:Installing xdebug on OS X Lion 10.7.6在 OS X Lion 10.7.6 上安装 xdebug
【发布时间】:2012-04-24 20:36:06
【问题描述】:

所以我安装了 xdebug,但我猜测它的版本错误,因为我下载了预编译版本并且它不起作用所以我决定自己制作。我按照 xdebug 站点上的说明进行操作,在运行 phpize 时出现以下错误:

Cannot find config.m4. 
Make sure that you run './phpize' in the top level source directory of the module

当我在目录 /usr/bin 中运行 phpize 时,我得到了同样的错误。

当我尝试查看我正在运行的 phpize 版本时,我收到以下错误:

grep: /usr/include/php/main/php.h: No such file or directory
grep: /usr/include/php/Zend/zend_modules.h: No such file or directory
grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:        
Zend Module Api No:     
Zend Extension Api No: 

另外一件让我停下脚步的事情是我没有 gcc 编译器我现在已经卸载并重新安装了两次 xcode 没有占上风...

【问题讨论】:

  • Lion 还没有达到 10.7.6 版本,它只有 10.7.3。

标签: php xcode xdebug


【解决方案1】:

您应该在带有 xdebug 源代码的目录中运行 phpize。它与xcode无关。然后你用 make 脚本编译它并将结果模块复制到 php 扩展文件夹。你确定你从 git 得到了正确的来源吗?

【讨论】:

  • 如果我这样做了,我会得到这个错误: grep: /usr/include/php/main/php.h: No such file or directory grep: /usr/include/php/Zend/zend_modules. h:没有这样的文件或目录grep:/usr/include/php/Zend/zend_extensions.h:没有这样的文件或目录配置:PHP Api版本:Zend Module Api No:Zend Extension Api No:找不到autoconf。请检查您的 autoconf 安装和 $PHP_AUTOCONF 环境变量。然后,重新运行此脚本。
  • sudo 有帮助吗?你可能有两个 php 版本的冲突,因为 mac 预装了一个,请参阅stackoverflow.com/questions/5789504/…
  • 如果我使用 php -i 我得到 5.3.8,这也是我通过 info.php 文件得到的。我想这意味着我可以安装两次相同的版本?我根本不知道如何解决这个问题......哦,sudo 根本没有帮助......
【解决方案2】:

XDebug 一直在工作我没有在我的 php.ini 文件中打开 html_errors,也没有在我的 index.php 文件中将 application_env 更改为 development,因为我正在使用 zend 框架!很抱歉造成混乱。

【讨论】:

    猜你喜欢
    • 2013-06-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多