网站导航免费论文 原创论文 论文搜索 原创论文 网学软件 学术大家 资料中心 会员中心 问题解答 原创论文 论文素材 设计下载 最新论文 下载排行 论文上传 在线投稿 联系我们
返回网学首页
网学联系
最新论文 推荐专题 热门论文 素材专题
当前位置: 网学 > 编程文档 > PHP > 正文
XDEBUG EXTENSION FOR PHP Installation
来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 12/12/07
下载{$ArticleTitle}原创论文样式

  Precompiled Modules

  There are a few precompiled modules for Windows, they are all for the non-debug version of PHP. See the links on the right side.

  Installing the precompiled modules is easy. Just place them in a directory, and add the following line to php.ini: (don't forget to change the path and filename to the correct one — but make sure you use the full path)

zend_extension_ts="c:/php/modules/php_xdebug-4.4.1-2.0.2.dll"PECL Installation

  As of Xdebug 0.9.0 you can install Xdebug through PEAR/PECL. This only works with with PEAR version 0.9.1-dev or higher and some Unix.

  Installing with PEAR/PECL is as easy as:

# pecl install xdebug

  but you still need to add the correct line to your php.ini: (don't forget to change the path and filename to the correct one — but make sure you use the full path)

zend_extension="/usr/local/php/modules/xdebug.so"Installation From Source

  You can download the source of the latest stable release 2.0.2. Alternatively you can obtain Xdebug from CVS:

cvs -d :pserver:srmread@cvs.xdebug.org:/repository login
CVS password: srmread
cvs -d :pserver:srmread@cvs.xdebug.org:/repository co xdebug

  This will checkout the latest development version which is currently 2.1.0-dev.

Compiling

  You compile Xdebug separately from the rest of PHP. Note, however, that you need Access to the scripts 'phpize' and 'php-config'. If your system does not have 'phpize' and 'php-config', you will need to compile and install PHP from a source tarball first, as these script are by-products of the PHP compilation and installation processes. (Debian users can install the required tools with apt-get install php4-dev, or apt-get install php5-dev). It is important that the source version matches the installed version as there are slight, but important, differences between PHP versions. Once you have access to 'phpize' and 'php-config', do the following:

  Unpack the tarball: tar -xzf xdebug-2.0.2.tgz. Note that you do not need to unpack the tarball inside the PHP source code tree. Xdebug is compiled separately, all by itself, as stated above.

  cd xdebug-2.0.2

  Run phpize: phpize (or /path/to/phpize if phpize is not in your path). See in the table below which version numbers it should show for different PHP versions. Make sure you use the phpize that belongs to the PHP version that you want to use Xdebug with.

  ./configure --enable-xdebug (or: ./configure --enable-xdebug --with-php-config=/path/to/php-config if php-config is not in your path).

If this fails with something like:../configure: line 1960: syntax error near unexpected token
`PHP_NEW_EXTENSION(xdebug,'
../configure: line 1960: ` PHP_NEW_EXTENSION(xdebug, xdebug.c
xdebug_code_coverage.c xdebug_com.c xdebug_handler_gdb.c
xdebug_handler_php3.c xdebug_handlers.c xdebug_llist.c xdebug_hash.c
xdebug_profiler.c xdebug_superglobals.c xdebug_var.c usefulstuff.c,
$ext_shared)'
then it means that you do not meet the PHP 4.3.x version requirement for Xdebug.

Another problem that might occur is:configure: line 1145: PHP_INIT_BUILD_SYSTEM: command not found
configure: line 1151: syntax error near unexpected token `config.nice'
configure: line 1151: `PHP_CONFIG_NICE(config.nice)'
You will need to upgrade your autotools (autoconf, automake and libtool) or install the known working versions: autoconf-2.13, automake-1.5 and libtool-1.4.3.

  make

  cp modules/xdebug.so /to/wherever/you/want/it

Configure PHP to Use Xdebug

  add the following line to php.ini: zend_extension="/wherever/you/put/it/xdebug.so" (for non-threaded use of PHP, for example the CLI, CGI or Apache 1.3 module) or: zend_extension_ts="/wherever/you/put/it/xdebug.so" (for threaded usage of PHP, for example the Apache 2 work MPM or the the ISAPI module). Note: In case you compiled PHP yourself and used --enable-debug you would have to use zend_extension_debug=.

  Restart your Webserver.

  Write a PHP page that calls 'phpinfo()' Load it in a browser and look for the info on the Xdebug module. If you see it next to the Zend logo, you have been successful! You can also use 'php -m' if you have a command line version of PHP, it lists all loaded modules. Xdebug should appear twice there (once under 'PHP Modules' and once under 'Zend Modules').

Compatibility

  Xdebug does not work together with the Zend Optimizer or any other Zend extension (DBG, APD etc). This is due to compatibility problems with those modules. We will be working on figuring out what the problems are, and of course try to fix those.

phpize Output Table

  

PHP Version:PHP Api Version:Zend Module Api No:Zend Extension Api No:Recommended version:
4.4.x2002091820020429200506062.0.2
5.1.x20041225200509222200510252.0.2
5.2.x20041225200606132200605192.0.2

Debugclient Installation

  Unpack the Xdebug source tarball and issue the following commands:

$ cd debugclient
$ ./configure --with-libedit
$ make
# make install

  This will install the debugclient binary in /usr/local/bin unless you don't have libedit installed on your system. You can either install it, or leave out the '--with-libedit' option to configure. Debian 'unstable' users can install the library with apt-get install libedit-dev libedit2.

  If the configure script can not find libedit and you are sure you have (and it's headers) installed correctly and you get link errors like the following in your configure.log:

/usr/lib64/libedit.so: undefined reference to `tgetnum'
/usr/lib64/libedit.so: undefined reference to `tgoto'
/usr/lib64/libedit.so: undefined reference to `tgetflag'
/usr/lib64/libedit.so: undefined reference to `tputs'
/usr/lib64/libedit.so: undefined reference to `tgetent'
/usr/lib64/libedit.so: undefined reference to `tgetstr'
collect2: ld returned 1 exit status

  you need to change your configure command to:

$ LDFLAGS=-lncurses ./configure --with-libedit

(责任编辑:admin)

  • 上一篇资讯: php的xdebug的配置和说明
  • 网学推荐

    免费论文

    原创论文

    浏览:
    设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
    版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
    湘ICP备09003080号