windows08安装php(fastcgi)
一、安装iis
安装的时候在应用程序开发这块要勾选fastcgi等动态
二、把php解压把解压出来的文件夹赋予权限
三、配置php.ini(没有的话生一个)
extension_dir ="D:\php\ext" #设置php模块路径
date.timezone = PRC #设置时区为中国时区
register_globals = On #开启GET数据调用
short_open_tag = On #php支持短标签
cgi.force_redirect = 0 #开启以CGI方式运行php(如果使用fastcgi打开)
fastcgi.impersonate = 1;
upload_tmp_fir=
cgi.rfc2616_headers = 1
之后把upload_tmp_fir指定的文件夹赋予权限
四、处理程序映射
添加模块映射->编辑模块映射
请求路径:*.php
模块:fastcgimodule
可执行文件c:\php\php-cgi.exe
名称:fastcgi(随便)
打开"fastcgi设置"
点击环境变量,添加PHP_FCGI_MAX_REQUESTS,取值设置为1000
监视对文件所做的更改:C:\php\php.ini
五、测试
<?php
phpinfo();
?>
六、测试发现报错500
需要安装 Visual Studio 2012
下载地址:http://www.microsoft.com/en-us/download/details.aspx?id=30679
- The VC11 builds require to have the Visual C++ Redistributable for Visual Studio 2012 x86 or x64 installed
- The VC14 builds require to have the Visual C++ Redistributable for Visual Studio 2015 x86 or x64 installed
- The VC15 builds require to have the Visual C++ Redistributable for Visual Studio 2017 x64 or x86 installed
本文档详细介绍了如何在Windows Server 2008上安装IIS并配置PHP环境,特别是使用FastCGI进行PHP执行。步骤包括安装IIS时勾选FastCGI支持,解压并配置PHP,修改php.ini文件,设置模块映射,以及处理FastCGI环境变量。最后,文章提到了在遇到500错误时,可能需要安装Visual Studio 2012的相应 redistributable 包。
1197

被折叠的 条评论
为什么被折叠?



