I've been trying to figure out how to resolve this error with all the new pages I create:
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
Well, it all started when I increased the security on MySQL by setting some more passwords, I think. I figured I'd get a better error report if I turned error reporting on in php.ini
, but it's not in my /apache/bin
folder.
Alright, so I have no idea what to do. I've also got this line in xampp: MySQL database DEACTIVATED
.
Any idea what might be happening? Also, please let me know if this should go to superuser.
If you're on Linux, try a "find", like this:
find / -name php.ini print
Another approach is to create a "phpinfo.php" in your Apache DocumentRoot folder, and let PHP tell you where you should put your 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 ();
?>
Use the find
feature in Linux, as specified by paulsm4 to find php.ini
.
Use ctrl+f
in Windows and search for files and folders -> php.ini
to find it in Windows. I recommend you do this from your web server's root directory rather than from some other location; otherwise, it may fail.
If you're experiencing a 500 error, you should check your Apache log files. They can be found in the /apache/logs
folder in the file error.log
, I believe. I emptied the file and then caused the error to isolate it. The information lead me to the answer.
In my case, the reason I was getting a 500 error was because my .htaccess
file was referencing a .htpasswrd
file that did not exist. I changed the line of code in the .htaccess
file that was targeting the .htpasswrd
file to target an existing .htpasswrd
file that I wanted to use. I could have just as soon copied a properly formatted .htpasswrd
file or made one from scratch, though.
I've read at multiple sources that 500 errors have many causes. So, none of these steps are guaranteed to work for you. If they do not, I wish you luck, and I hope that you will post a reply telling me how you fixed your 500 error, too--or, a link to a resolved question about a 500 error.