contents

intro
overview
requirements
cgi basics

dyno cgi
cgi headers
cgi parameters
accessing files
pipe basics
substitution basics
more substitution
table substitution

Requirements

There are two sets of requirements to use Dyno CGI.

First, your web server. It needs to support user-installed CGIs, because you will need to put your executable CGI program on the server where it runs. If the web server is your own machine, this is usually not a problem, If the web server is located at a web hosting provider, you'll need to be able to put the executable in the appropariate directory of the web server.

Second, your development environment. You need to have access to a C++ compiler that compiles the code and outputs an executable program suitable for running on your web server. Once again, if the web server is your own machine, you probably have this already. Also, if your web site is hosted elsewhere but you have the same kind of machine (say, you're both using Sun workstations, or both using Intel/NT servers), you can compile on your machine and then place the program on the host. The main showstopper is if your web site is hosted by a web hosting service provider, and you don't have what they have. In this case (possibly the most common of all), you need to have "shell access" to the web server, and be able to run the compiler on that machine. If your host is a Unix ISP, this is quite common.

In the case of a Unix host, you may be using the GNU gcc compiler. To build the Hello World example CGI, you would first copy the three files (main.cpp, dyno_cgi.h, and dyno_cgi.cpp) to the host, and then compile them like this:

> gcc main.cpp dyno_cgi.cpp -o hello.cgi

This compiles and links the code, and outputs an executable program called hello.cgi. I won't go into issues of server directory paths and executable permissions, except to say that you may have to issue a chmod command on the executable, such as:

> chmod 755 hello.cgi

in order to permit the web server to run it. You should check the documentation and guidelines for your web server or ISP to see where they want you to locate your CGI programs and what the proper permission settings are.

If we suppose that hello.cgi lives in your web site's "/cgi-bin" directory, then it can be invoked with this URL:

http://www.yourdomain.com/cgi-bin/hello.cgi