IIS 和 PHP:HTTP 错误 404.3 - 未找到:由于扩展配置,无法提供您请求的页面
IIS and PHP: HTTP Error 404.3 - Not Found: The page you are requesting cannot be served because of the extension configuration
我正在尝试在 IIS 上设置 PHP 和 WordPress。我关注了 this post. I also checked here and here.
但是在请求我的页面时仍然出现错误:http://www.example.com/wordpress/wp-admin/post.php
HTTP Error 404.3 - Not Found: The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
但是,我能够请求 info.php(仅使用此代码:<?php phpinfo(); ?>
)并且我得到了预期的结果,第一部分在这里:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<style type="text/css">
body {background-color: #ffffff; color: #000000;}
body, td, th, h1, h2 {font-family: sans-serif;}
pre {margin: 0px; font-family: monospace;}
a:link {color: #000099; text-decoration: none; background-color: #ffffff;}
a:hover {text-decoration: underline;}
table {border-collapse: collapse;}
.center {text-align: center;}
.center table { margin-left: auto; margin-right: auto; text-align: left;}
.center th { text-align: center !important; }
td, th { border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}
h1 {font-size: 150%;}
h2 {font-size: 125%;}
.p {text-align: left;}
.e {background-color: #ccccff; font-weight: bold; color: #000000;}
.h {background-color: #9999cc; font-weight: bold; color: #000000;}
.v {background-color: #cccccc; color: #000000;}
.vr {background-color: #cccccc; text-align: right; color: #000000;}
img {float: right; border: 0px;}
hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;}
</style>
<title>phpinfo()</title><meta name="ROBOTS" content="NOINDEX,NOFOLLOW,NOARCHIVE" /></head>
<body><div class="center">
<table border="0" cellpadding="3" width="600">
<tr class="h"><td>
<a href="http://www.php.net/"><img border="0" src="/info.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42" alt="PHP Logo" /></a><h1 class="p">PHP Version 5.3.28</h1>
</td></tr>
</table><br />
<table border="0" cellpadding="3" width="600">
<tr><td class="e">System </td><td class="v">Windows NT MSFT-SURFA 6.2 build 9200 (Unknow Windows version Enterprise Edition) i586 </td></tr>
<tr><td class="e">Build Date </td><td class="v">Dec 10 2013 22:04:40 </td></tr>
<tr><td class="e">Compiler </td><td class="v">MSVC9 (Visual C++ 2008) </td></tr>
<tr><td class="e">Architecture </td><td class="v">x86 </td></tr>
<tr><td class="e">Configure Command </td><td class="v">cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--disable-zts" "--disable-isapi" "--disable-nsapi" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=C:\php-sdk\oracle\instantclient11\sdk,shared" "--with-enchant=shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--disable-static-analyze" </td></tr>
<tr><td class="e">Server API </td><td class="v">CGI/FastCGI </td></tr>
<tr><td class="e">Virtual Directory Support </td><td class="v">disabled </td></tr>
<tr><td class="e">Configuration File (php.ini) Path </td><td class="v">C:\WINDOWS </td></tr>
<tr><td class="e">Loaded Configuration File </td><td class="v">C:\Program Files (x86)\PHP\v5.3\php.ini </td></tr>
<tr><td class="e">Scan this dir for additional .ini files </td><td class="v">(none) </td></tr>
<tr><td class="e">Additional .ini files parsed </td><td class="v">(none) </td></tr>
<tr><td class="e">PHP API </td><td class="v">20090626 </td></tr>
<tr><td class="e">PHP Extension </td><td class="v">20090626 </td></tr>
<tr><td class="e">Zend Extension </td><td class="v">220090626 </td></tr>
<tr><td class="e">Zend Extension Build </td><td class="v">API220090626,NTS,VC9 </td></tr>
<tr><td class="e">PHP Extension Build </td><td class="v">API20090626,NTS,VC9 </td></tr>
<tr><td class="e">Debug Build </td><td class="v">no </td></tr>
<tr><td class="e">Thread Safety </td><td class="v">disabled </td></tr>
<tr><td class="e">Zend Memory Manager </td><td class="v">enabled </td></tr>
<tr><td class="e">Zend Multibyte Support </td><td class="v">disabled </td></tr>
<tr><td class="e">IPv6 Support </td><td class="v">enabled </td></tr>
<tr><td class="e">Registered PHP Streams </td><td class="v">php, file, glob, data, http, ftp, zip, compress.zlib, https, ftps, phar, sqlsrv </td></tr>
<tr><td class="e">Registered Stream Socket Transports </td><td class="v">tcp, udp, ssl, sslv3, sslv2, tls </td></tr>
<tr><td class="e">Registered Stream Filters </td><td class="v">convert.iconv.*, mcrypt.*, mdecrypt.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, zlib.* </td></tr>
</table><br />
<table border="0" cellpadding="3" width="600">
<tr class="v"><td>
<a href="http://www.zend.com/"><img border="0" src="/info.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42" alt="Zend logo" /></a>
This program makes use of the Zend Scripting Language Engine:<br />Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies<br /></td></tr>
</table><br />
</body></html>
解决方案:
(感谢@Kul-Tigin)
我的 wordpress\web.config
文件包含代码:
<handlers>
<remove name="PHP53_via_FastCGI" />
</handlers>
注释掉后,它起作用了。
在 IIS 中,HTTP 404.3 Not Found 错误在两种情况下发生。
- 请求的文件扩展名的处理程序映射不是
配置。
- 没有为 Web 配置适当的 MIME 类型
网站或应用程序。
由于有问题的页面是脚本,您需要配置适当的处理映射器。
在这样做之前,最好检查所有可能的子目录中的 web.config
文件,以防使用 <remove
下的 <remove
指令从本地删除上层处理程序映射配置12=].
我正在尝试在 IIS 上设置 PHP 和 WordPress。我关注了 this post. I also checked here and here.
但是在请求我的页面时仍然出现错误:http://www.example.com/wordpress/wp-admin/post.php
HTTP Error 404.3 - Not Found: The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
但是,我能够请求 info.php(仅使用此代码:<?php phpinfo(); ?>
)并且我得到了预期的结果,第一部分在这里:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<style type="text/css">
body {background-color: #ffffff; color: #000000;}
body, td, th, h1, h2 {font-family: sans-serif;}
pre {margin: 0px; font-family: monospace;}
a:link {color: #000099; text-decoration: none; background-color: #ffffff;}
a:hover {text-decoration: underline;}
table {border-collapse: collapse;}
.center {text-align: center;}
.center table { margin-left: auto; margin-right: auto; text-align: left;}
.center th { text-align: center !important; }
td, th { border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}
h1 {font-size: 150%;}
h2 {font-size: 125%;}
.p {text-align: left;}
.e {background-color: #ccccff; font-weight: bold; color: #000000;}
.h {background-color: #9999cc; font-weight: bold; color: #000000;}
.v {background-color: #cccccc; color: #000000;}
.vr {background-color: #cccccc; text-align: right; color: #000000;}
img {float: right; border: 0px;}
hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;}
</style>
<title>phpinfo()</title><meta name="ROBOTS" content="NOINDEX,NOFOLLOW,NOARCHIVE" /></head>
<body><div class="center">
<table border="0" cellpadding="3" width="600">
<tr class="h"><td>
<a href="http://www.php.net/"><img border="0" src="/info.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42" alt="PHP Logo" /></a><h1 class="p">PHP Version 5.3.28</h1>
</td></tr>
</table><br />
<table border="0" cellpadding="3" width="600">
<tr><td class="e">System </td><td class="v">Windows NT MSFT-SURFA 6.2 build 9200 (Unknow Windows version Enterprise Edition) i586 </td></tr>
<tr><td class="e">Build Date </td><td class="v">Dec 10 2013 22:04:40 </td></tr>
<tr><td class="e">Compiler </td><td class="v">MSVC9 (Visual C++ 2008) </td></tr>
<tr><td class="e">Architecture </td><td class="v">x86 </td></tr>
<tr><td class="e">Configure Command </td><td class="v">cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--disable-zts" "--disable-isapi" "--disable-nsapi" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=C:\php-sdk\oracle\instantclient11\sdk,shared" "--with-enchant=shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--disable-static-analyze" </td></tr>
<tr><td class="e">Server API </td><td class="v">CGI/FastCGI </td></tr>
<tr><td class="e">Virtual Directory Support </td><td class="v">disabled </td></tr>
<tr><td class="e">Configuration File (php.ini) Path </td><td class="v">C:\WINDOWS </td></tr>
<tr><td class="e">Loaded Configuration File </td><td class="v">C:\Program Files (x86)\PHP\v5.3\php.ini </td></tr>
<tr><td class="e">Scan this dir for additional .ini files </td><td class="v">(none) </td></tr>
<tr><td class="e">Additional .ini files parsed </td><td class="v">(none) </td></tr>
<tr><td class="e">PHP API </td><td class="v">20090626 </td></tr>
<tr><td class="e">PHP Extension </td><td class="v">20090626 </td></tr>
<tr><td class="e">Zend Extension </td><td class="v">220090626 </td></tr>
<tr><td class="e">Zend Extension Build </td><td class="v">API220090626,NTS,VC9 </td></tr>
<tr><td class="e">PHP Extension Build </td><td class="v">API20090626,NTS,VC9 </td></tr>
<tr><td class="e">Debug Build </td><td class="v">no </td></tr>
<tr><td class="e">Thread Safety </td><td class="v">disabled </td></tr>
<tr><td class="e">Zend Memory Manager </td><td class="v">enabled </td></tr>
<tr><td class="e">Zend Multibyte Support </td><td class="v">disabled </td></tr>
<tr><td class="e">IPv6 Support </td><td class="v">enabled </td></tr>
<tr><td class="e">Registered PHP Streams </td><td class="v">php, file, glob, data, http, ftp, zip, compress.zlib, https, ftps, phar, sqlsrv </td></tr>
<tr><td class="e">Registered Stream Socket Transports </td><td class="v">tcp, udp, ssl, sslv3, sslv2, tls </td></tr>
<tr><td class="e">Registered Stream Filters </td><td class="v">convert.iconv.*, mcrypt.*, mdecrypt.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, zlib.* </td></tr>
</table><br />
<table border="0" cellpadding="3" width="600">
<tr class="v"><td>
<a href="http://www.zend.com/"><img border="0" src="/info.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42" alt="Zend logo" /></a>
This program makes use of the Zend Scripting Language Engine:<br />Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies<br /></td></tr>
</table><br />
</body></html>
解决方案: (感谢@Kul-Tigin)
我的 wordpress\web.config
文件包含代码:
<handlers>
<remove name="PHP53_via_FastCGI" />
</handlers>
注释掉后,它起作用了。
在 IIS 中,HTTP 404.3 Not Found 错误在两种情况下发生。
- 请求的文件扩展名的处理程序映射不是 配置。
- 没有为 Web 配置适当的 MIME 类型 网站或应用程序。
由于有问题的页面是脚本,您需要配置适当的处理映射器。
在这样做之前,最好检查所有可能的子目录中的 web.config
文件,以防使用 <remove
下的 <remove
指令从本地删除上层处理程序映射配置12=].