I'm having that same problem.
Have create a perl script. Can get it to execute direcly from the command line
ie:
[root@e-smith cgi-bin]# ./myscript.pl
and it executes as I expect.
When I execute if via a web browser
ie
http:///intranet/cgi-bin/myscript.pl
I receive the message
/---------------------------------------------------------------------------------------------------
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@allt.homeip.net and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
--------------------------------------------------------------------------------------------------/
opening the httpd log
[Thu Jul 31 17:32:23 2003] [error] (13)Permission denied: exec of /home/e-smith/files/ibays/intranet/cgi-bin/myscript.pl failed
[Thu Jul 31 17:32:23 2003] [error] [client 192.168.0.151] Premature end of script headers: /home/e-smith/files/ibays/intranet/cgi-bin/myscsript.pl
changing the permission to
chmod 777 myscript.pl
results in the message
[Thu Jul 31 17:48:31 2003] [error] [client 192.168.0.151] Premature end of script headers: /home/e-smith/files/ibays/intranet/cgi-bin/myscript.pl
running the script from the command line and pipeing it into a file
ie
./myscript.pl > myscript.html
and then opening myscript.html in a browser works as expected.
The CGI script itself seems to be sound thus this seems to be an issue with my e-smith server
note, before I changed the file permissions using chmod 777, running it from the commandline and piping into a file still resulted in valid html that could be run from a browser.