【Azure App Service for Windows】 PHP应用出现500 : The page cannot be displayed because an internal server error has occurred. 错误

简介: 【Azure App Service for Windows】 PHP应用出现500 : The page cannot be displayed because an internal server error has occurred. 错误

问题描述

PHP应用突然遇见了500 The page cannot be displayed because an internal server error has occurred.错误,但是如果访问一个静态HTML页面,就可以成功。只要是PHP页面,就是500。

 

问题解答

登录App Service的Kudu站点,查看日志发现一句:  scriptProcessor could not be found in "fastCGI" application configuration.

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
  <Provider Name="WWW Server" Guid="{3A2A4E84-4C21"/>
  <EventID>0</EventID>
  <Version>1</Version>
  <Level>3</Level>
  <Opcode>18</Opcode>
  <Keywords>0x100</Keywords>
  <TimeCreated SystemTime="2023-07-05T07:35:06.598Z"/>
  <Correlation ActivityID="{800003B}"/>
  <Execution ProcessID="6616" ThreadID="2832"/>
  <Computer>dw</Computer>
</System>
<EventData>
  <Data Name="ContextId">{8000031E-0000--}</Data>
  <Data Name="ErrorDescription">&lt;handler&gt; scriptProcessor could not be found in &lt;fastCGI&gt; application configuration</Data>
</EventData>
<RenderingInfo Culture="zh-CN">
  <Opcode>SET_RESPONSE_ERROR_DESCRIPTION</Opcode>
  <Keywords>
   <Keyword>RequestNotifications</Keyword>
  </Keywords>
</RenderingInfo>
<ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
  <EventGuid>{00E}</EventGuid>
</ExtendedTracingInfo>
</Event>

错误消息显示因为脚本处理器(scriptProcessor)无法找到 fastCGI 模块。 而这个 fastCGI 是通过web.config配置,从App Service的实例中获取。

接下来,查看PHP的 FastCGI 处理程序 php_cgi.exe的路径。

然后,查看web.config中配置的路径,发现路径配置为D:\Program Files\...., 所以,尝试修改 FastCGI中 ScriptProcessor的路径为 C:\ 。

最后,保存修改。重新访问页面返回200成功。

 

解决了 scriptProcessor could not be found in "fastCGI" application configuration 问题。

 

相关文章
|
安全 Windows
【Azure Cloud Service】在Windows系统中抓取网络包 ( 不需要另外安全抓包工具)
通常,在生产环境中,为了保证系统环境的安全和纯粹,是不建议安装其它软件或排查工具(如果可以安装,也是需要走审批流程)。 本文将介绍一种,不用安装Wireshark / tcpdump 等工具,使用Windows系统自带的 netsh trace 命令来获取网络包的步骤
534 32
|
C# Windows
【Azure App Service】在App Service for Windows上验证能占用的内存最大值
根据以上测验,当使用App Service内存没有达到预期的值,且应用异常日志出现OutOfMemory时,就需要检查Platform的设置是否位64bit。
380 11
|
网络安全 API 数据安全/隐私保护
【Azure App Service】.NET代码实验App Service应用中获取TLS/SSL 证书 (App Service Windows)
【Azure App Service】.NET代码实验App Service应用中获取TLS/SSL 证书 (App Service Windows)
295 0
|
Shell PHP Windows
【Azure App Service】Web Job 报错 UNC paths are not supported. Defaulting to Windows directory.
【Azure App Service】Web Job 报错 UNC paths are not supported. Defaulting to Windows directory.
329 0
|
10月前
|
安全 数据安全/隐私保护 虚拟化
Windows Server 2022 中文版、英文版下载 (2025 年 10 月更新)
Windows Server 2022 中文版、英文版下载 (2025 年 10 月更新)
2309 2
Windows Server 2022 中文版、英文版下载 (2025 年 10 月更新)
|
10月前
|
安全 Unix 物联网
Windows 7 & Windows Server 2008 R2 简体中文版下载 (2025 年 10 月更新)
Windows 7 & Windows Server 2008 R2 简体中文版下载 (2025 年 10 月更新)
1020 0
Windows 7 & Windows Server 2008 R2 简体中文版下载 (2025 年 10 月更新)
|
11月前
|
运维 安全 网络安全
Windows Server 2019拨号“找不到设备”?Error 1058解决指南
Windows Server 2019拨号报错1058?别急!这不是硬件故障,而是关键服务被禁用。通过“服务依存关系”排查,依次启动“安全套接字隧道协议”“远程接入连接管理”和“路由与远程访问”服务,仅需4步即可恢复PPPoE或VPN拨号功能,轻松解决网络中断问题。
749 1
|
10月前
|
存储 SQL 人工智能
Windows Server 2025 中文版、英文版下载 (2025 年 10 月更新)
Windows Server 2025 中文版、英文版下载 (2025 年 10 月更新)
1236 0
|
11月前
|
存储 SQL 人工智能
Windows Server 2025 中文版、英文版下载 (2025 年 9 月更新)
Windows Server 2025 中文版、英文版下载 (2025 年 9 月更新)
9800 3
Windows Server 2025 中文版、英文版下载 (2025 年 9 月更新)

热门文章

最新文章