新梦想网络 > 客服中心 > 独立服务器 > 正文缩放字号: [收藏本问题]

云主机服务器安装php5.4

时间:2014-06-03来源:新梦想网络 作者:新梦想网络 点击:
     此教程适合win2003,win2008,win2012。
 一、安装
http://download.west263.net/vps/php5.4_install.rar 下载解压到d:\download
然后到执行php5.4_install.bat,按照步骤输入"ok"即可。
注意:1.此安装程序支持windows2003、2008、2012系统。 2.windows2003系统php5.3和5.4不能同时存在,安装5.4会覆盖以前的5.3

二、映射
windows2003系统
1.设置iis站点,将php的指向:C:\WINDOWS\system32\inetsrv\fcgiext.dll,如图


2.添加web扩展允许fcgiext.dll,然后到站点根目录下创建一个php文件写入代码:<?php phpinfo();?>.访问这个文件检测即可。
windows2008、2012系统
因我们程序里面未加入PHP5.4,单独在IIS站点上设置的话会生成web.config文件,可直接编辑IIS的配置文件

C:\Windows\System32\inetsrv\config\applicationHost.config
用记事本打开搜索站点名 xxxxxxx
找到如下节点

<location path="xxxxxxx">
        <system.webServer>
           ...........
            <handlers>
                <remove name="PHP" />
                <add name="PHP" path="*.php" verb="GET,POST,HEAD" modules="IsapiModule" scriptProcessor="C:\php_52\php5isapi.dll" resourceType="Either" requireAccess="Script" />
            </handlers>
        </system.webServer>
    </location>
把<add name="PHP".......
改为 
<add name="PHP" path="*.php" verb="GET,POST,HEAD" modules="FastCgiModule" scriptProcessor="D:\SOFT_PHP_PACKAGE\php_54\php-cgi.exe" resourceType="Either" requireAccess="Script" /> 即可

然后写个PHPINFO测试即可。
 

    TAG:

    下载此文章 (欢迎转载,请注明出处:http://www.xmxwl.net/help/member/20140603/13312.html)