IIS不提供PHP页面 [英] IIS Not Serving PHP pages

查看:100
本文介绍了IIS不提供PHP页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已完全按照这些说明操作,但我收到无法找到页面404错误
http://learn.iis.net/page.aspx/247/using-fastcgi-to-host-php-applications- on-iis-60 /

I have followed these instructions exactly, yet I get a "Page cannot be found" 404 error http://learn.iis.net/page.aspx/247/using-fastcgi-to-host-php-applications-on-iis-60/

我的PHP文件是

 <?php
 phpinfo();
 ?>

我正在运行Windows Server 2003并安装了FastCGI,并确保按照这些说明一切正确。我也可以创建一个HTML页面,这没有问题,所以它一定是PHP的问题。任何帮助将不胜感激,谢谢!

I am running Windows Server 2003 and installed FastCGI and made sure everything is correct per those instructions. I can also create an HTML page and that serves no problem, so it must be an issue with PHP. Any help would be appreciated, thanks!

推荐答案

如果IIS正在从你设置PHP的网站上提供平面html文件,是时候检查php日志文件了。最有可能的是,由于php配置(php.ini)发生了一些错误,并且php没有向屏幕显示错误。当我在IIS下安装新的php时,这种情况发生在我身上。

If IIS is serving flat html file from the site you've setup PHP on, it's time to check the php log file. Most likely, there are some errors occuring due to the php configuration (php.ini), and php is not displaying the errors to the screen. This happens to me a lot when I setup a new install of php under IIS.

查看你的php.ini文件,找到你所在日志文件的位置。如果未将日志文件写入该目录,请确保该目录可由PHP写入。这将是应用程序池配置为使用的用户(默认情况下,它类似于网络服务,iis_usr等)。确保用户对日志文件目录具有填写写入权限。

Look in your php.ini file to find the location of you're log file. If the log file isn't being written to that directory, make sure the directory is writable by PHP. This will be the user the app pool is configured to use (by default it something like network service, iis_usr, or the like). Make sure that user has fill write permissions on the log file directory.

同时仔细检查您的Windows事件日志,看看是否有任何可能有助于识别问题。这可能发生在一些旧版本的Windows服务器上。

Also double check your windows event log to see if there were any suppressed popup messages that may help identify the problem. This can happen on some of the older versions of windows server.

这篇关于IIS不提供PHP页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆