CDatabase in a CGI script

I am trying to use a CDatabase object in a simple CGI script. When I run it from the command line, no problem -- it spits out the HTML code that it should spit out. When I try to run it as a CGI script on a web server, the web server complains about an Internal Server Error, and the machine that it is running on pops up a box complaining about "This application has requested the Runtime to terminate it in an unusual way." I know this is the fault of the CDatabase because when I comment out those portions of code things run just fine.

Answer this question

CDatabase in a CGI script