Re: differences between shell and cgi...

by Kyle Matthews <jits(at)>

 Date:  Tue, 29 Feb 2000 09:16:20 +1300
 To:  hwg-languages(at)
 References:  co
  todo: View Thread, Original
At 08:35 AM 2/28/00 -0500, you wrote:
>Kyle Matthews wrote:
>> Can anyone think of a reason why the shell script would appear to work
>> fine, with all the html'd output, but the cgi version using the same
>> outputting functions, wouldn't?
>The most common reasons are permissions (does the web server have
>permission to execute the program? Make sure it is a+x.) and headers -
>does the code output valid headers? Other possibilities are that you
>rely on some path information that is not available when run from the
>CGI. Do you call any library files or external applications that might
>not be in the path when run without a PATH environment variable set as
>you expect it to be?

some additional information which might pinpoint it more:

sometime the script does work in the browser - the main input is a date -
if I choose a date for which there is no data (the data is school sports
game results - no data means there was a school holiday on that week) then
it outputs the expected 'there were no games that week' result. it is only
when there is some data that the cgi messes up. yet for the shell version,
it seems to output correct html code, for the same version that the cgi
goes 500 internal server error on. This is what led me to conclude that
there must be something in the meat of the shell script which was being
rejected by the cgi server/browser.

Any further help?


HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA