Posted on: 2013-01-09 17:09:56.000
500 Server Errors are hard to debug, because they can be almost anything. Your best bet is to run your script, and then immediately go into /var/log/apache2 and sudo nano error.log
, then hit Ctrl W Ctrl V to jump to the end of the file. Here you can see what the error message was.
If it says something like "Forbidden" then you know you have permission problems. sudo chown www-data:www-data can fix these, or sudo chmod 755.
If it's something like "Premature end of script header" one of the most common causes is that the file being executed was edited on a Windows machine and thus has Windows-style carriage return + line feed combos as the end of the line. You can convert these files with a utility called ToFroDos ( http://www.thefreecountry.com/tofrodos/index.shtml
) that can be installed as a package in Ubuntu, or by using a text editor that will save in Unix line-end format.
As for the "No post requested" errors in Rockets, that's something I have to debug myself. :)