Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 使用Mac OS 10.9和XAMPP安装XDebug_Php_Macos_Xdebug - Fatal编程技术网

Php 使用Mac OS 10.9和XAMPP安装XDebug

Php 使用Mac OS 10.9和XAMPP安装XDebug,php,macos,xdebug,Php,Macos,Xdebug,我对XDebug感到头疼,我无法安装它。 我在官方网站上下载源代码: git clone git://github.com/xdebug/xdebug.git 然后,我知道我已经安装了一个预安装版本的PHP,所以我通过以下方式调用phpize: sudo /Applications/XAMPP/xamppfiles/bin/phpize 它为我提供了输出: Configuring for: PHP Api Version: 20100412 Zend Module A

我对XDebug感到头疼,我无法安装它。 我在官方网站上下载源代码:

git clone git://github.com/xdebug/xdebug.git
然后,我知道我已经安装了一个预安装版本的PHP,所以我通过以下方式调用phpize:

sudo /Applications/XAMPP/xamppfiles/bin/phpize
它为我提供了输出:

    Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
configure.in:3: warning: prefer named diversions
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
aclocal.m4:3585: AC_LIBTOOL_LINKER_OPTION is expanded from...
aclocal.m4:5597: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:5492: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:3109: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2967: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2947: AC_PROG_LIBTOOL is expanded from...
configure.in:150: the top level
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
aclocal.m4:3548: AC_LIBTOOL_COMPILER_OPTION is expanded from...
aclocal.m4:8133: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...
aclocal.m4:5597: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:5492: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:3109: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2967: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2947: AC_PROG_LIBTOOL is expanded from...
configure.in:150: the top level
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_CXX, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
aclocal.m4:3548: AC_LIBTOOL_COMPILER_OPTION is expanded from...
aclocal.m4:8133: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...
aclocal.m4:6549: _LT_AC_LANG_CXX_CONFIG is expanded from...
aclocal.m4:5605: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
aclocal.m4:4737: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:3109: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2967: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2947: AC_PROG_LIBTOOL is expanded from...
configure.in:150: the top level
configure.in:3: warning: prefer named diversions
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
aclocal.m4:3585: AC_LIBTOOL_LINKER_OPTION is expanded from...
aclocal.m4:5597: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:5492: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:3109: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2967: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2947: AC_PROG_LIBTOOL is expanded from...
configure.in:150: the top level
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
aclocal.m4:3548: AC_LIBTOOL_COMPILER_OPTION is expanded from...
aclocal.m4:8133: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...
aclocal.m4:5597: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:5492: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:3109: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2967: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2947: AC_PROG_LIBTOOL is expanded from...
configure.in:150: the top level
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_CXX, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
aclocal.m4:3548: AC_LIBTOOL_COMPILER_OPTION is expanded from...
aclocal.m4:8133: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...
aclocal.m4:6549: _LT_AC_LANG_CXX_CONFIG is expanded from...
aclocal.m4:5605: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
aclocal.m4:4737: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:3109: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2967: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2947: AC_PROG_LIBTOOL is expanded from...
configure.in:150: the top level
看起来一切都很好

唯一可能出错的是医生说我应该:

Zend Module Api No:      20090626
Zend Extension Api No:   220090626
然后,我使用./configure

输出:

    checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-apple-darwin13.3.0
checking host system type... i686-apple-darwin13.3.0
checking target system type... i686-apple-darwin13.3.0
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib/php/extensions/no-debug-non-zts-20100525
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to enable eXtended debugging support... yes, shared
checking Check for supported PHP versions... supported (5.4.24)
checking for gettimeofday... yes
checking for cos in -lm... yes
checking for ld used by cc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 196608
checking command to parse /usr/bin/nm output from cc object... rm: conftest.dSYM: is a directory
ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
checking if cc static flag  works... rm: conftest.dSYM: is a directory
yes
checking if cc supports -fno-rtti -fno-exceptions... rm: conftest.dSYM: is a directory
yes
checking for cc option to produce PIC... -fno-common
checking if cc PIC flag -fno-common works... rm: conftest.dSYM: is a directory
yes
checking if cc supports -c -o file.o... rm: conftest.dSYM: is a directory
yes
checking whether the cc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin13.3.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged
看起来还可以

然后,按照官方文件,我做:sudo make

输出:

    Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
configure.in:3: warning: prefer named diversions
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
aclocal.m4:3585: AC_LIBTOOL_LINKER_OPTION is expanded from...
aclocal.m4:5597: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:5492: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:3109: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2967: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2947: AC_PROG_LIBTOOL is expanded from...
configure.in:150: the top level
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
aclocal.m4:3548: AC_LIBTOOL_COMPILER_OPTION is expanded from...
aclocal.m4:8133: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...
aclocal.m4:5597: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:5492: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:3109: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2967: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2947: AC_PROG_LIBTOOL is expanded from...
configure.in:150: the top level
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_CXX, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
aclocal.m4:3548: AC_LIBTOOL_COMPILER_OPTION is expanded from...
aclocal.m4:8133: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...
aclocal.m4:6549: _LT_AC_LANG_CXX_CONFIG is expanded from...
aclocal.m4:5605: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
aclocal.m4:4737: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:3109: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2967: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2947: AC_PROG_LIBTOOL is expanded from...
configure.in:150: the top level
configure.in:3: warning: prefer named diversions
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
aclocal.m4:3585: AC_LIBTOOL_LINKER_OPTION is expanded from...
aclocal.m4:5597: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:5492: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:3109: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2967: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2947: AC_PROG_LIBTOOL is expanded from...
configure.in:150: the top level
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
aclocal.m4:3548: AC_LIBTOOL_COMPILER_OPTION is expanded from...
aclocal.m4:8133: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...
aclocal.m4:5597: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:5492: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:3109: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2967: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2947: AC_PROG_LIBTOOL is expanded from...
configure.in:150: the top level
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_CXX, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
aclocal.m4:3548: AC_LIBTOOL_COMPILER_OPTION is expanded from...
aclocal.m4:8133: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...
aclocal.m4:6549: _LT_AC_LANG_CXX_CONFIG is expanded from...
aclocal.m4:5605: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
aclocal.m4:4737: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:3109: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2967: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2947: AC_PROG_LIBTOOL is expanded from...
configure.in:150: the top level
/bin/sh /Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5/libtool --mode=compile cc  -I. -I/Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5 -DPHP_ATOM_INC -I/Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5/include -I/Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5/main -I/Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5/xdebug.c -o xdebug.lo 
mkdir .libs
/bin/sh /Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5/libtool --mode=compile cc  -I. -I/Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5 -DPHP_ATOM_INC -I/Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5/include -I/Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5/main -I/Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5/xdebug_handler_dbgp.c -o xdebug_handler_dbgp.lo 
 cc -I. -I/Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5 -DPHP_ATOM_INC -I/Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5/include -I/Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5/main -I/Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5/xdebug_handler_dbgp.c  -fno-common -DPIC -o .libs/xdebug_handler_dbgp.o
/Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5/xdebug_handler_dbgp.c:1328:21: warning: incompatible pointer types initializing 'jmp_buf *' (aka 'int (*)[37]')
      with an expression of type 'sigjmp_buf *' (aka 'int (*)[38]') [-Wincompatible-pointer-types]
        jmp_buf           *original_bailout = EG(bailout);
                           ^                  ~~~~~~~~~~~
/Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5/xdebug_handler_dbgp.c:1363:14: warning: incompatible pointer types assigning to 'sigjmp_buf *' (aka 'int (*)[38]')
      from 'jmp_buf *' (aka 'int (*)[37]') [-Wincompatible-pointer-types]
        EG(bailout) = original_bailout;
                    ^ ~~~~~~~~~~~~~~~~
2 warnings generated.

[... log cut to fit allowed chars]

creating xdebug.la
(cd .libs && rm -f xdebug.la && ln -s ../xdebug.la xdebug.la)
/bin/sh /Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5/libtool --mode=install cp ./xdebug.la /Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5/modules
cp ./.libs/xdebug.so /Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5/modules/xdebug.so
cp ./.libs/xdebug.lai /Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5/modules/xdebug.la
----------------------------------------------------------------------
Libraries have been installed in:
   /Users/admin/Downloads/xdebug-2.2.5/xdebug-2.2.5/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
     during execution

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.
看起来可以。 然后:

最后,我编辑:

/Applications/XAMPP/xamppfiles/etc/php.ini and add the line
zend_extension = /Applications/XAMPP/xamppfiles/lib/php/php-5.3.0/extensions/no-debug-non-zts-20090626/xdebug.so
我重新启动服务器,并且我始终有:

 Summary

 Xdebug installed: no
 Server API: Apache 2.0 Handler
 Windows: no
 Zend Server: no
 PHP Version: 5.3.0
 Zend API nr: 220090626
 PHP API nr: 20090626
 Debug Build: no
 Thread Safe Build: no
 Configuration File Path: /Applications/XAMPP/xamppfiles/etc
 Configuration File: /Applications/XAMPP/xamppfiles/etc/php.ini
 Extensions directory: /Applications/XAMPP/xamppfiles/lib/php/php-5.3.0/extensions/no-debug-non-zts-20090626
我错在哪里


我尝试了所有的方法,二进制文件,pecl等等。。。没有工作。

您可以使用xdebug默认值

在/Applications/XAMPP/xamppfiles/etc/php.ini中编辑,将xdebug.so的位置分配给zend_扩展

[xdebug]
zend_extension="/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so"
;change no-debug-non-zts-20131226 for your folder
;debug remote
xdebug.remote_enable=on
xdebug.remote_port =9000
xdebug.remote_enable = 1
然后重新启动lampp并安装Xdebug

信息:

您是否可以检查phpinfo()并查找“Loaded Configuration File”(加载的配置文件)参数,以确保您正在编辑正确的php.ini。您还可以尝试将zend_扩展路径用双引号括起来:zend_extension=“path”