Windows2008 IIS7+PHP 5.3.5配置PHP图解

PHP5.3.5 官方下载:http://windows.php.net/downloads/releases/php-5.3.5-Win32-VC9-x86.zip
 
首先安装好IIS7 安装的时候 要注意三个地方打得勾
 


注:   CGI  会在IIS7+PHP_5.3.5的环境中用到
 
 
 
下面开始添加IIS的PHP支持
 
1.  将下载回来的php_5.3.5解压到 C:\php目录(也可以放在其他地方,但是后面应该做相应修改)
 
2.  将php.ini-development改名为php.ini
 
3.  修改php.ini 查找data.timezone  修改为date.timezone = “Asia/Shanghai”(这里必须改,不然会出警告)   找到Windows Extensions开启 所需模块,如:php_curl.dll  php_mysql.dll   php_mysqli.dll   php_xmlrpc.dll   php_curl.dll   只要去掉前面的 分号 保存就可以了
 
4.  添加<模块映射>
 

 

 


这里的路径按你的实际情况填写.
 
5. 添加应用程序池
 


6.  另外,php.ini里面也要做些改动
 ■Set fastcgi.impersonate = 1. FastCGI under IIS supports the ability to impersonate security tokens of the calling client. This allows IIS to define the security context that the request runs under.
 ■Set cgi.fix_pathinfo=1. cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. Previously, PHP behavior was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not define PATH_INFO. For more information about PATH_INFO, see the cgi specifications. Setting this value to 1 will cause PHP CGI to fix its paths to conform to the specifications.
 ■Set cgi.force_redirect = 0.
 ■Set open_basedir to point to the folder or network path where the content of the Web site(s) is located.
 ■Set extension_dir to point to the location where the PHP extensions are located. Typically, for PHP 5.2.X the value would be set as extension_dir = “./ext”
 

 

7.  在网站根目录新建一个phpinfo.php的文本文件 内容为:

<?php
 phpinfo();
?>
 
8.  测试,打开浏览器看结果:localhost/phpinfo.php,如果能看到类似下面的页面就说明你成功了:


 


好了,到现在 已经可以成功的运行PHP程序了.

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值