if its a cgi script have a look at Perl CGI Debugging: Solving a 500 Internal Server Error http://www.thesitewizard.com/archive/servererror.shtml if a php script look at III. Troubleshoot http://webmaster.iu.edu/PHPlanguage/index.shtml they will both give you the basic things to check. hope they help.
I'm going to imagine it related to suPHP/PHPSuexec which both require php files to have 644 file permissions and directories to be 755. They also cannot have php values set in a .htaccess.