CGI-mode and The Temporary Directory
The most difficult part of the CGI-mode Sawmill installation is choosing the correct Temporary directory and Temporary directory URL. When you run Sawmill in web server mode (with Sawmill running its own internal web server, and serving its pages via HTTP), this step is not necessary, which is one of the advantages of web server mode. However, if you prefer to run Sawmill in CGI mode, you will have to choose the Temporary directory and URL.
Sawmill includes images as part of its output, including pie charts, line graphs, bar charts, and icons. To display these images, it first creates GIF image files in the Temporary directory, and then embeds the URLs of those images in the HTML of the pages it generates, using the Temporary directory URL as the basis for choosing the correct URL.
The Temporary directory and the Temporary directory URL are two different ways of describing the same directory. They must point to the same directory for Sawmill's output to look correct. The temporary directory:
- must be within the HTML pages directory of the web server which is
serving Sawmill. Web servers serve all their pages from a particular
directory on the hard drive; the Temporary directory must be somewhere
within this directory. This directory is called different things by
different web servers, but some common names are %22htdocs%22, %22html%22,
%22data%22, %22wwwroot%22, and %22Web Pages.%22 If you do not know where this
directory is for your web server, you can find out in your web server's
documentation. See Web Server Information for a list of web servers,
and where the HTML pages directory is for them.
- must either exist and be writable by Sawmill (running as a CGI program),
or it must be possible for Sawmill to create it. UNIX users
may need to use the
chmodcommand to set permissions correctly.
As the hostname part of the URL, you will need to specify the machine Sawmill is running on. In the examples below, this is chosen to be www.mysys.com; you will need to replace this part of the URL with your machine's actual hostname.
Example 1: For MacOS, if the root of your web server's HTML pages is at /Library/WebServer/Documents (i.e. the Documents directory, which is in the WebServer directory, which is in the Library folder), and this is accessible from your web browser as http://www.mysys.com/, then you could enter /Library/WebServer/Documents/sawmill/ as the Temporary directory and http://www.mydomain.com/sawmill/ as the Temporary directory URL.
Example 2: For Windows, if the root of your web server is at C:\inetpub\wwwroot\ (i.e. the wwwroot directory, which is in the inetpub directory, which is on the C drive), and this is accessible from your web browser as http://www.mysys.com/, then you could enter C:\\inetpub\\wwwroot\\ sawmill\\ as the Temporary directory and http://www.mydomain.com/sawmill/ as the Temporary directory URL.
Example 3: For UNIX, if the root of your web server is at /home/httpd/html/, and this is accessible from your web browser as http://www.mydomain.com/, then you could enter /home/httpd/html/sawmill/ as the Temporary directory and http://www.mysys.com/sawmill/ as the Temporary directory URL.
It is also possible to use relative pathnames, which sometimes makes it easier; e.g. on UNIX if both the cgi-bin directory and the html directory are in the same directory, you can use ../html/sawmill as the temporary directory, without having to specify the full pathname.See Web Server Information for more information.