极湖

无不用其“极”

Windows 下构建 PHP 开发环境: WampServer + Xdebug

,

1. 下载 WampServer
网址: http://www.wampserver.com/en/download.php

2. 安装 WampServer
Windows 的标准安装步骤,连续点“下一步”即可。

3. 下载 Xdebug
网址: http://xdebug.org/download.php

页面上有好几个版本,刚开始一定会被迷惑,不知道该用哪个版本。
经过试验,我的环境(Windows XP)最终能用的是 5.3 VC6 (32 bit)。
(Apache 以外的服务器需用 nts 版本)

下载之后把文件移动(或复制)到 WampServer 的 php 的 ext 目录。

4. 编辑 php.ini
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
追加以下内容:
extension=php_xdebug-2.0.5-5.3-vc6.dll

;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
追加以下内容:
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000


注意: 需要编辑的是 Apache 目录下的 php.ini 文件

5. 重新启动 WampServer 的 apache。


追记:
新版本的 WampServer 已经集成 Xdebug,无需自己安装。
php.ini 的设置如下:
; XDEBUG EXTENSION
zend_extension = "c:/wamp/bin/php/php5.3.4/zend_ext/php_xdebug-2.1.1-5.3-vc9-x86_64.dll"

[xdebug]
xdebug.remote_enable = off
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/wamp/tmp"

Smarty 下最简单的调试方法采用 Zend Framework 的开源产品

Write a comment

You must be logged in to write a comment. If you're not a registered member, please sign up.

February 2012
S M T W T F S
January 2012March 2012
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29