AJAX: Internal Server Error 500

First lesson learned today: Always check the error logs whenever you get a weird server error with obscure message describing what actually transpired...

While attempting to use AJAX & PHP, I kept running into a weird Internal Server Error. After spending lots of time on google, it turns out that the problem was the PERMISSION (chmod) given to the PHP file being requested.

I had the php file set at PERM 0777, which apparently causes the server to freak out, because PHP files being writable can be a very, very dangerous thing.

Lesson #2: Set the permission for PHP on server to 0644.

No comments: