windows7下面搭建 Xampplite+Eclipse PDT+XDebug的PHP开发环境

淡水是用xampplite1.7.1,它的php版本是5.2.9。最新版的xampp搭载的是php5.3,淡水的程序跑起来好像有些问题-_-!!

1,下载PDT(PHP Development Tools),地址:http://www.eclipse.org/pdt/downloads/
我下的版本是PDT 2.1 All In Ones,解压后如果不能运行,请安装JRE安装,因为Eclipse需要JRE才能运行。地址 :http://www.java.com/zh_CN/download/manual.jsp

2,下载XAMPPlite1.7.1这个集成的PHP+MySql运行环境,如果是EXE安装包,就双击安装,如果是ZIP包,就解压运行。地址:http://www.apachefriends.org/en/xampp-windows.html

3,下载XDebug,我下载的是php_xdebug-2.0.4-5.2.8.dll,用这个替换xampplite1.7.1自带的php_xdebug.dll,自带的无法正常调试。地址:http://xdebug.org/download.php

4,编辑php.ini
添加如下到php.ini
[XDebug]
;; Only Zend OR (!) XDebug
zend_extension_ts=”\xampplite\php\ext\php_xdebug.dll”
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=on
xdebug.profiler_output_dir=”\xampplite\tmp”

原来php.ini里有;extension=php_xdebug.dll,这里无需去掉注释。因为php5.2.9使用zend_extension_ts来挂载xdebug(php5.3开始用zend_extension挂载,又不一样了)

5,配置Eclipse PDT,进入window->preferences
展开PHP,配置其中的PHP Executables,如图
配置PHP Executables
配置Debug,如图
配置Debug
这样就搞定了,可以不用盗版的zend studio for Eclipse鸟。。。最后,说windows7下搭建。。其实只是个噱头;)

Leave a comment

1 Comments.

  1. 5.3似乎有问题

Leave a Reply


[ Ctrl + Enter ]

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word