differences between shell and cgi...

by Kyle Matthews <jits(at)ihug.co.nz>

 Date:  Mon, 28 Feb 2000 23:43:20 +1300
 To:  hwg-languages(at)hwg.org
  todo: View Thread, Original
Hi.

I tend to build my CGIs first with a shell version, which initially
produces the functionality, and then I add in the html code so I can paste
it all out of my window, and then into an editor, and hey presto, can see
if it works. Developing straight to a CGI version is too difficult, because
of the 500 internal server errors which don't tell you what the problem is.

Anyway, I've almost finished this very overdue database, in C, using linked
lists and outputting various bits of the records to screen. I'm able to get
the shell version working fine, outputs as it should, and then finishes. No
seg.faults or other errors that I can see. When I stick the same code in as
a .cgi, and use a browser, it just gives me 500 error, but i can't pick why.

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? What have I done? I could send someone the
code if they wanted to sift through the relevant bits, but it's rather long.

Kyle

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