ServersApache Guide: Dynamic Content with CGI Page 3

Apache Guide: Dynamic Content with CGI Page 3

ServerWatch content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

When a program runs through the web server as a CGI program, it does not have that
path. Any programs that you invoke in your CGI program (like sendmail, for example)
will need to be specified by a full path, so that the shell can find them
when it attempts to execute your CGI program.

Syntax Errors

Most of the time when a CGI program fails, it’s because of a problem with the
program itself. This is particularly true once you get the hang of this CGI stuff,
and no longer make the above two mistakes. Always attempt to run your program
from the command line before you test if via a browser. This will elimate most
of your problems, and will prevent having to look through cryptic error logs.

For More Information

There are a large number of CGI resources on the Web. You can discuss CGI
problems with other users on the Usenet group
comp.infosystems.www.authoring.cgi. And the -servers mailing list from the
HTML Writers Guild is a great source of answers to your questions. You can
find out more at

When you post a question about a CGI problem that you’re having, whether
to a mailing list, or to a newsgroup, make sure you provide enough information
about what happened, what you expected to happen, and how what actually happened
was different, what server you’re running, what language your CGI program
was in, and, if possible, the offending code. This will make finding your
problem much simpler.

Rich Bowen is the Director of Web Application Development at The Creative Group and the author of Apache Server Unleashed.

Get the Free Newsletter!

Subscribe to Daily Tech Insider for top news, trends & analysis

Latest Posts

Related Stories