Okay, that got the script working if you do a direct call, however the script still errors when called from a webpage Example: http://dwarfnet.heliohost.org/cgi-bin/fortunecookie.cgi will return the fortune line however clicking on the fortunecookie at http://dwarfnet.heliohost.org/fortunecookie will still cause a 500 server error even though it is calling the same script.