LAMP学习之旅--开发环境的搭建

  没有Linux,这里用Windows代替,相信不会对开发体验有多大影响。
  下面需要到各官方网站下载开发工具了。

Apache: http://httpd.apache.org/下载Apache 2.2.11
http://apache.mirror.phpchina.com/httpd/binaries/win32/apache_2.2.11-win32-x86-openssl-0.9.8i.msi
或者 http://apache.mirror.phpchina.com/httpd/binaries/win32/apache_2.2.11-win32-x86-no_ssl.msi

MySQL: http://www.mysql.com下载MySQL5.1 http://mysql.mirror.tw/Downloads/MySQL-5.1/mysql-5.1.32-win32.msi

PHP: http://php.net/下载php-5.2.9 http://cn.php.net/get/php-5.2.9-1-win32-installer.msi/from/this/mirror

PDT: http://www.eclipse.org/下载pdt-all-in-one-win32-2.0 http://www.eclipse.org/downloads/download.php?file=/tools/pdt/downloads/drops/2.0.0/R200812290607/pdt-all-in-one-win32-2.0.0GA.zip&url=http://download.actuatechina.com/eclipse/tools/pdt/downloads/drops/2.0.0/R200812290607/pdt-all-in-one-win32-2.0.0GA.zip&mirror_id=385

ZendDebugger: http://www.zend.com/en/products/studio/downloads或者 http://www.zend.com/download/151

安装Apache,MySQL和PHP
解压PDT
将ZendDebugger包中的ZendDebugger-5.2.14\5_2_x_comp\ZendDebugger.dll文件解压到php安装目录的ext子目录下

配置打开Apache安装目录下的conf子目录下的httpd.conf增加对php的配置
引用

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "D:/Program Files/PHP/"
# 对 PHP 5 用这两行:
LoadModule php5_module "D:/Program Files/PHP/php5apache2_2.dll"
#AddType application/x-httpd-php.php
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

再增加对pdt的workspace的配置
引用

Alias /pdt "C:/Documents and Settings/dht/workspace"
<Directory "C:/Documents and Settings/dht/workspace">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

PHP安装目录下的php.ini增加:
引用
zend_extension_ts="D:\\Program Files\\PHP\\ext\\ZendDebugger.dll"
zend_debugger.allow_hosts=127.0.0.1/32
zend_debugger.expose_remotely=always

注意上述的目录情况,根据实际情况配置。


打开pdt,新建工程,新建php文件内容如下
<?php
phpinfo();
?>

配置PHP Executables,选择菜单Window-Preferences-PHP-PHP Executables,点击按钮Search,选择PHP的安装目录(比如D:\Program Files\PHP)进行搜索,确定即可。
配置PHP Servers,选择菜单Window-Preferences-PHP-PHP Servers,如果有默认的Server则选择此Server,点击“Edit”按钮,如图:

配置默认的Web Brower,选择菜单Window-Preferences-General-Web Brower,选择IE吧。


选择菜单Window-Preferences-General-Workspace,将Text file encoding修改为UTF-8
在新建的php文件上,点击右键,选择Debug As-PHP Web Page。


你可能感兴趣的:(apache,eclipse,PHP,mysql,Zend)