我一直在试图找出如何解决这个错误与我创建的所有新页面:
Server error!
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
If you think this is a server error, please contact the webmaster.
Error 500
localhost
2011/11/28 13:36:56
Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1
我想,这一切都始于我通过设置更多密码来提高MySQL的安全性。我想如果我在php.ini
中打开错误报告,我会得到更好的错误报告,但它不在我的/apache/bin
文件夹中。
好吧,我不知道该怎么做。我也有这一行在示例pp: MySQL database DEACTIVATED
。
你知道会发生什么吗?另外,请让我知道这是否应该交给超级用户。
如果您使用的是Linux系统,请尝试使用"find"命令,如下所示:
find / -name php.ini print
另一种方法是在Apache DocumentRoot文件夹中创建一个"phpinfo.php",让PHP告诉你应该把PHP .ini放在哪里:
<?php
// Create this file in your Apache root,
// then browse to http://localhost/phpinfo.php
// Look for "Configuration File (php.ini) Path" in the resulting output
phpinfo ();
?>
使用Linux中的find
特性,如paulsm4指定的查找php.ini
。
在Windows中使用ctrl+f
并搜索files and folders -> php.ini
以在Windows中找到它。我建议你从你的web服务器的根目录,而不是从其他位置。否则,可能会失败。
如果你遇到500错误,你应该检查你的Apache日志文件。我相信它们可以在error.log
文件中的/apache/logs
文件夹中找到。我清空了文件,然后导致错误将其隔离。这个信息使我找到了答案。
在我的情况下,我得到500错误的原因是因为我的.htaccess
文件引用了一个不存在的.htpasswrd
文件。我更改了针对.htpasswrd
文件的.htaccess
文件中的代码行,以针对我想使用的现有.htpasswrd
文件。我可以很快复制一个正确格式化的.htpasswrd
文件,或者从头开始制作一个。
我从多个来源读到500个错误有很多原因。所以,这些步骤都不能保证对你有效。如果他们没有,我祝你好运,我希望你能回复我,告诉我你是如何修复你的500错误的,或者,一个关于500错误的解决问题的链接。