OS X 10.9小牛上的PHP Xdebug [英] PHP Xdebug on OS X 10.9 Mavericks

查看:107
本文介绍了OS X 10.9小牛上的PHP Xdebug的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在安装OS X 10.9 Mavericks之后,在OS X上设置PHP开发环境时遇到问题.

I'm having issues setting up my PHP development environment on OS X after installing OS X 10.9 Mavericks.

这是我要用来安装的命令.

Here is the command I am using to install.

sudo pecl install xdebug

downloading xdebug-2.2.3.tgz ...
Starting to download xdebug-2.2.3.tgz (250,543 bytes)
.....................................................done: 250,543 bytes
66 source files, building
running: 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:
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.

ERROR: `phpize' failed

有人有解决方案或解决方法吗?

Anyone have a solution or a workaround?

推荐答案

快速复制粘贴方式

sudo sh -c 'echo zend_extension=$(find /usr/lib/php/extensions -name "xdebug.so") >> $(php -qr "echo php_ini_loaded_file();") && apachectl restart'

此命令执行以下操作:

  • 找到Xcode随附的本机Xdebug扩展
  • 询问php加载了哪个配置文件
  • 在配置文件中添加Xdebug扩展路径
  • 重新启动apache.

与Sierra,El Capitan&优胜美地(Yosemite)带有捆绑式Apache,但未经MAMP& XAMPP.

Compatible with Sierra, El Capitan & Yosemite with the bundeled apache, but untested with MAMP & XAMPP.

在启动命令之前,请确保已安装Xcode命令行工具:xcode-select --install

Before launching the command, make sure Xcode command line tools are installed : xcode-select --install

这篇关于OS X 10.9小牛上的PHP Xdebug的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆