Unit ID
llAEROP6PKOcMr3n6DwcedW+wPvxMqiEoAJCUb3PwYg=
Received
18.11.2020 05:16:35
Confirmation delay (full node)
12 minutes 54 seconds
Confirmation delay (light node)
13 minutes 41 seconds
Messages
Data
author: obyte
title: windows server 2012配置php环境教程
summary: 介绍手工在windows server 2012上面配置php环境的具体步骤
content: <p>买了windows系统的服务器(VPS)等之后我们需要一个php环境来搭建自己的项目,这里介绍手工在windows server 2012上面配置php环境的具体步骤,适合使用服务器和VPS等的新手。<br>php 5.6.12<br>下载地址:<a href="http://windows.php.net/downloads/releases/php-5.6.19-nts-Win32-VC11-x86.zip" rel="external nofollow" target="_blank">http://windows.php.net/downloads/releases/php-5.6.19-nts-Win32-VC11-x86.zip</a></p><p>Visual Studio 2010 动态链接库(64位系统两个都要装,如果不装就会出现msvcr100.dll丢失问题,导致500错误)<br>下载地址:<a href="http://download.microsoft.com/download/9/C/D/9CD480DC-0301-41B0-AAAB-FE9AC1F60237/VSU4/vcredist_x64.exe" rel="external nofollow" target="_blank">http://download.microsoft.com/download/9/C/D/9CD480DC-0301-41B0-AAAB-FE9AC1F60237/VSU4/vcredist_x64.exe</a><br>下载地址:<a href="http://download.microsoft.com/download/9/C/D/9CD480DC-0301-41B0-AAAB-FE9AC1F60237/VSU4/vcredist_x86.exe" rel="external nofollow" target="_blank">http://download.microsoft.com/download/9/C/D/9CD480DC-0301-41B0-AAAB-FE9AC1F60237/VSU4/vcredist_x86.exe</a></p><p>首先,下载安装Visual Studio 2010 动态链接库<br><br><img id="aimg_7801" title="01.png" src="https://www.zhujiceping.com/wp-content/themes/begin/img/blank.gif" alt="windows server 2012配置php环境教程" width="600"></p><p>在C盘根目录创建“php”文件夹<br><br></p><p>将下载到的php文件全部复制到“php”文件夹中<br><br></p><p>复制“php.ini-production”并改名为“php.ini”<br><br></p><p>用记事本打开“php.ini”,设置php模块路径<br>extension_dir = "C:\php\ext"<br><br></p><p>设置php时区<br>date.timezone = Asia/Shanghai<br><br></p><p>开启php短标签<br>short_open_tag = on<br><br></p><p>以CGI模式运行PHP<br>cgi.force_redirect = 0<br><br></p><p>fastcgi.impersonate = 1<br><br></p><p>cgi.rfc2616_headers = 1<br><br></p><p>PHP拓展板块,按需开启<br><br></p><p>进入IIS控制面板选择主页,单击“处理程序映射”<br><br></p><p>单击“添加模块映射”<br><br></p><p>输入内容后单击“确定”<br>请求路径:*.php<br>模块:FastCgiModule<br>可执行文件(可选):C:\php\php-cgi.exe<br>名称:FastCgi<br>没有找到FastCgiModule模块的解决方法在帖子的最下方<br><br></p><p>单击“是”<br><br></p><p>单击“FastCGI设置”<br><br></p><p>右击点击“编辑”<br><br></p><p>将“监视对文件所做的更改”改为php.ini的绝对位置 C:\php\php.ini<br><br></p><p>单击“聚合编辑器”右边的按钮<br><img id="aimg_7819" title="18.png" src="https://www.zhujiceping.com/wp-content/themes/begin/img/blank.gif" alt="windows server 2012配置php环境教程" width="600"></p><p>添加信息,单击“确定”</p><div align="left">Name:PHP_FCGI_MAX_REQUESTS</div><div align="left">Value:1000</div><p><br></p><p>在IIS控制面板中,单击“默认文档”<br><br></p><p>增加“index.php”<br><br></p><p>在默认的站点下新建一个名为“index.php”的文件<br><br></p><p>编辑“index.php”,测试PHP信息,保存退出<br>&lt;?php<br>phpinfo();<br>?&gt;<br><br></p><p>访问 http://localhost/ 成功配置PHP<br><br></p><p>注:有些小伙伴可能找不到“FastCgiModule”板块,那是因为没有安装CGI,只需要在“添加角色和功能向导”中选中CGI并安装就可以了</p>
Technical information
Fees:
3,420 bytes
(451 headers, 2969 payload)
Level:6213182
Witnessed level:6213170
Main chain index:6067039
Latest included mc index:6067038
Status:stable/confirmed/final