问题描述
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"><handler> scriptProcessor could not be found in <fastCGI> 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 问题。
- displayed internal occurred 错误 Servicedisplayed internal occurred错误 quot internal occurred桌面 actionfacade executing occurred internal processing occurred错误request internal错误500.19 server mirrorlist appstream internal错误 internal错误500.21 server 手动 错误horizon display kubernetes internal流程 错误 错误0x8007000d internal x