windows环境php5+apache2+mysql5的安装详细指导

windows环境php5+apache2+mysql5的安装

本人在windows sp2+apache2.2.2+php5.1.4+mysql5.0环境下的安装步骤如下:

一:下载安装apache

1:下载

  http://httpd.apache.org/download.cgi  win32 Binary(MSI Installer)。

2:安装:

  停掉IIS(如果装了的话(www publishing服务)),正常安装(注意要设置admin的email)。

二:下载安装PHP5

1:下载:

  www.php.net/downloads.php 下载zip版,不要下载installer版。

2:安装:

  把zip文件夹解压到d:/php5下,

  d:/php/php5ts.dll cut (not copy) to  c:/windows/php5ts.dll

三:配置apache+PHP5

  1:创建站点文件目录 c:/webs/test

  2:重命名d:/php/php.ini-dist 为 d:/php/php.ini, 做如下修改 d:/php/php.ini file:

    (1) doc_root = "c:/webs/test" and (2) extension_dir = "d:/php/ext"

  3: 设置apache httpd.conf文件(C:/Program Files/Apache Group/Apache2/conf/httpd.conf)

  3.1 change the DocumentRoot entry to: DocumentRoot "C:/webs/test"

  3.2 change the Directory entry to: <Directory "C:/webs/test">.

  3.3 add the following lines: hint: to find this position fast, search for "media types"

     
ScriptAlias /php/ "d:/php5/"
AddType application/x-httpd-php .php .php5
Action application/x-httpd-php "/php/php-cgi.exe"
SetEnv PHPRC "d:/php5"

  3.4 Find the "DirectoryIndex" entry and add "index.php"  通过跟路径可以访问到index.php

  4:测试

     4.1:写一个index.php文件

    内容
     Today is <? print strftime("%m/%d/%Y");  ?>

     4.2:重启apache。

     4.3:访问http://localhost 看是否成功。
     

 

详细指导见: http://www.tanguay.at/installPhp5.php5

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值