/usr/local/lib/guestbook/guestbook.pl)The administrator should also make sure that the users have the right to run cgi scripts (Set "Options ExecCGI" in /etc/httpd/httpd.conf), and that those cgi scripts run under the user's privileges (suexec).
Moreover, certain templates use image links. These images should be copied to a place which is visible from the web (Apache's "icons" directory), and the templates should be adapted, if needed (by default, the images point to /icons/guestbook/template/image.jpg). If you just copy guestbook's "icons" subdirectory to /usr/local/httpd/icons/guestbooks, the templates should work as is.
guestbook.cgi example
from /usr/local/lib/guestbook/examples/guestbook.cgi to
his Web directory, and customizes it to his taste. The following
variables can be set in this script:
@localhost
is used, where user is the Unix user as who the script runs.
$mail='user@somewhere.org';
If you don't want any mail to be sent, just set it to the empty
string:
$mail='';
$username="Tom";
$template='/usr/local/lib/guestbook/templates/darwin.html';
require "/usr/local/lib/guestbook/guestbook.pl";
require "/home/tom/guestbook/guestbook.pl";
If you don't have access to your web servers icon directory, choose
another directory, and adapt the links in the templates files.
The template contains must contain two markers to mark the area where messages will be displayed: BEGIN_MESSAGE and END_MESSAGE, and a number of variables (such as ${mail}, ${body}, ${$maillink}). The text between those markers are repeated once for each message, and the variables are substituted with their value:
For each message:
Global variables: