php HTTP 错误 500.0 - 内部服务器错误发生未知的 FastCGI 错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6176093/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
HTTP Error 500.0 - Internal Server Error An unknown FastCGI error occured
提问by HasanG
I'm running IIS7 on Windows Server 2008 with Plesk 10. I have website under plesk and a site not under plesk and only on IIS. The website under plesk successfully runs php files but the other website gives error:
我在带有 Plesk 10 的 Windows Server 2008 上运行 IIS7。我在 plesk 下有网站,在 plesk 下有一个站点,仅在 IIS 上。plesk 下的网站成功运行 php 文件,但其他网站报错:
HTTP Error 500.0 - Internal Server
Error An unknown FastCGI error occuredModule FastCgiModule
Notification ExecuteRequestHandler
Handler PHP5-FastCGI-php
Error Code 0x8007010b
Requested URL http://*.com:80/test.php Physical
Path C:\IIS*.com\test.php
Logon Method Anonymous
Logon User Anonymous
HTTP 错误 500.0 - 内部服务器
错误发生未知的 FastCGI 错误模块 FastCgiModule
通知 ExecuteRequestHandler
处理程序 PHP5-FastCGI-php
错误代码 0x8007010b
请求的 URL http://*.com:80/test.php 物理
路径 C:\IIS*.com\test.php
登录方法 匿名
登录 用户匿名
PHP5-FastCGI-php is configured exactly like the site under plesk. php-cgi.exe is located at C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\
PHP5-FastCGI-php 的配置与 plesk 下的站点完全相同。php-cgi.exe 位于 C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\
EDIT:Here is my php.ini but I don't get any errors.
编辑:这是我的 php.ini 但我没有收到任何错误。
error_reporting = E_ALL & ~E_NOTICE
display_errors = On
display_startup_errors = Off
log_errors = On
error_log = "C:\Program Files (x86)\...\log\test.log"
error_log = syslog
回答by HasanG
Granted Read & execute, List folder contentsfor Everyoneon folder
授予读取和执行权限,列出文件夹中所有人的文件夹内容
C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5
C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5
and now php is up and running for every Application Pool. The main problem with plesk was, only sites running with Application Pool Identity of a user which is member of psacln.
现在 php 已为每个应用程序池启动并运行。plesk 的主要问题是,只有使用 psacln 成员用户的应用程序池标识运行的站点。
回答by Robin
I think better than granting EVERYONE, would be to grant the builtin IIS group "IIS_IUSRS" read, read and execute and list folder contents on the PHP folder.
我认为比授予每个人更好的是授予内置的 IIS 组“IIS_IUSRS”读取、读取和执行以及列出 PHP 文件夹上的文件夹内容。
回答by C. Damoc
I had the same issue and look for a solution for 2 days. It was trial and error. The error code was 0x8007010b. In IIS logs
我遇到了同样的问题,并在 2 天内寻找解决方案。这是反复试验。错误代码是 0x8007010b。在 IIS 日志中
#Fields: ... sc-status sc-substatus sc-win32-status time-taken
... 500 0 267 4
Both error 0x8007010b and 267 (use command NET HELPMSG 267
) say that The directory name is invalid.
错误 0x8007010b 和 267(使用命令NET HELPMSG 267
)都说The directory name is invalid.
Solution:
解决方案:
- Grant full-access to IUSR to:
- my webapp folder
- folder containing the executable to be run (in my case python.exe)
- In IIS go to -> Authentication (double-click it) -> Select Anonymous Authentication (should be Enabled) -> Edit... -> Choose 'Specific User' set
IUSR
- Select root IIS (click) -> Authentication (double-click it) -> Select Anonymous Authentication (should be Enabled) -> Edit... -> Choose 'Specific User' set
IUSR
- 授予对 IUSR 的完全访问权限:
- 我的 webapp 文件夹
- 包含要运行的可执行文件的文件夹(在我的例子中是 python.exe)
- 在 IIS 中转到 -> 身份验证(双击它) -> 选择匿名身份验证(应启用) -> 编辑... -> 选择“特定用户”集
IUSR
- 选择root IIS(单击)-> Authentication(双击它)-> 选择匿名身份验证(应启用)-> 编辑...-> 选择“特定用户”设置
IUSR
After doing steps 1-3, Error 500.0 was gone. In my case step 3 was missing. I think it is an important detail to know.
执行步骤 1-3 后,错误 500.0 消失了。就我而言,缺少第 3 步。我认为这是一个重要的细节。
Hope it help!
希望有帮助!
回答by pay it forward
I had the same problem. once i try to get on the phpmyadmin page it gives me the 500 error response. To fix this:
我有同样的问题。一旦我尝试进入 phpmyadmin 页面,它就会给我 500 错误响应。要解决此问题:
Step 1) you've to enable the extensions " extension=php_gd2.dll ", " extension=php_mbstring.dll " , and " extension=php_mysql.dll " in php.ini (in php folder) ( if you did that already then go to step two).
第 1 步)您必须在 php.ini(在 php 文件夹中)中启用扩展“ extension=php_gd2.dll ”、“ extension=php_mbstring.dll ”和“ extension=php_mysql.dll ”(如果您已经这样做了,那么转到第二步)。
Step 2) create a folder in c: named "temp" and inside that folder create another folder named "phpsessions" , after doing so go to php.ini (in php folder) and look for "session.save_path" and replace whatever between the quotation mark with the location of the php session you created i.e. "C:\temp\phpsessions" and don't forget to uncomment it ;
第 2 步)在 c: 中创建一个名为“temp”的文件夹,然后在该文件夹中创建另一个名为“phpsessions”的文件夹,然后转到 php.ini(在 php 文件夹中)并查找“session.save_path”并替换它们之间的任何内容带有您创建的 php 会话位置的引号,即“C:\temp\phpsessions”,不要忘记取消注释;
Good luck to my fellow geeks :P
祝我的极客们好运:P
回答by gaRex
Try to find more info in logs. Then try to find all *.log files in your panel's dir. Those with latest modified time should give a chance.
尝试在日志中查找更多信息。然后尝试在面板目录中查找所有 *.log 文件。那些修改时间最晚的人应该给一个机会。
Logs could be defined not in php.ini only. Try to search for them -- not trust any *.ini files :)
日志不能只在 php.ini 中定义。尝试搜索它们——不要相信任何 *.ini 文件:)