Well this appears not to have anything to do with the script. I dont know what host you are using, but you may wish to check out this link and see if it helps you figuring out what a problem this may be. The best way to troubleshoot is to see the error log, it gives the best clue:
http://www.webhostinghub.com/support...l-server-error