我的apache服务器上有一个包含多个php脚本的文件夹。 此文件夹中的所有php脚本都可以工作,除了1.所有PHP脚本(包括不起作用的脚本)都具有相同的权限。
当我在浏览器中运行脚本时出现此错误:
HTTP ERROR 500可能有用的详细信息:
PHP版本7.0.11 Apache / 2.2.15(CentOS)
There is a folder on my apache server containing several php scripts. All the php scripts in this folder work except for 1. All the php scripts including the script that doesn't work have the same rights.
When I run the script in my browser I get this error:
HTTP ERROR 500Details that may be helpful:
PHP Version 7.0.11 Apache/2.2.15 (CentOS)
最满意答案
Apache状态代码500表示“内部服务器错误”。 如果没有看到产生此错误的代码,很难说是导致它的原因,但首先要检查的是服务器配置和.htaccess文件。 确保您的服务器正常运行然后检查您的.htaccess文件,因为一个错误的规则会强制某些类型的PHP出现故障。 正如@RiggsFolly所说,问题也可能是一些编写得非常糟糕的PHP,可以用一个简单的程序替换它来测试,如: <?php echo "test"; ?> <?php echo "test"; ?>
An Apache status code of 500 means "internal server error". Without seeing the code that is producing this error it is hard to say what is causing it but the first things to check are server configuration and your .htaccess file. Make sure your server is running properly then check your .htaccess file as a bad rule can force some types of PHP to malfunction. As @RiggsFolly stated, it is also possible that the problem is some very poorly written PHP which can be tested by replacing it with a simple program like: <?php echo "test"; ?>
更多推荐
发布评论