[ Matt's Script Archive ]
[ Frequently Asked Questions ]
[ Guestbook ]
- Everything seems to work, but the guestbook isn't written to.
- Everything works, but when I turn on the mail option, it errors out.
- Why doesn't the date show up on my page?
- Are there any sites that will host my guestbook?
Everything seems to work, but the guestbook isn't written to.
Most likely there is one of two solutions:
1. Check to make sure it is correctly chmoded - One of the most
commons errors, is the one that occurs with chmod. The problem is often that users
forget to chmod, or they use the wrong commands. If you have a setup in
which the guestbook.pl is in the cgi-bin directory and the rest of your
documents are in a guestbook directory, you would cd to the
correct directory and perform the following commands:
$ chmod 777 guestbook/
$ chmod 777 guestbook/guestbook.html
$ chmod 777 guestbook/guestlog.html
$ chmod 744 guestbook/addguest.html
$ chmod 755 cgi-bin/guestbook.pl
The above '$' symbols represent your Unix
prompt.
2. Make sure the paths are correct in the cgi scripts - Make sure
that in your variables for the cgi scripts, the paths to the documents
are correct. If you are on a Unix
system, you can take the filename and type:
more filename
If it spits out the file, you probably have the correct path. Do not use
'~' in your path, instead spell out each directory in the filepath.
Everything works, but when I turn on the mail option, it errors out.
Short Answer:
Check your mail path.
Long Answer:
This often happens to users because of one of two
problems. Either they haven't corrected the sendmail path or their email
address, or they don't have sendmail.
1. Check path to sendmail and mailing address - Remember if you
turn on the mail option you must set two new variables. The $mailprog
variable and the $recipient variable. Many people run into the problem
on the $mailprog variable, because they forget to change this. Many
systems do not have sendmail in the /usr/lib directory which is default
in my scripts, and some don't even have sendmail! To find out where its
located on your system, use the following command at your unix prompt:
which sendmail
This will tell you where sendmail is on your system. If it says it could
not find it, you don't necessarily not have it, just ask your system
administrator. The other common problem is to make sure that you have
set your email address correctly.
2. The second most common error is that your system doesn't have
sendmail. If this is the case, ask your system administrator what mail
programs you do have that you can send mail from a cgi program with?
Some of them are: mailx, mail, etc... You can use the which
command for these as well. If anyone has a patch for mailx or whatever,
send it to me and I will put it here.
Why doesn't the date show up on my page?
I have heard from several people that the date for many of my scripts is
causing 501 errors and messing up the scripts. This seems to happen the most
on Sun OS machines, and the problem seems to be that there are a couple of
characters that the version of date you are running does not support.
Specifically the %A and %Z options. If you are having problems with the date,
try one of the three options below:
- This one usually happens on Sun OS machines:
Change any of the commands and lines that contain something similar
to:
$date = `date +"%A ... %Z"`;
so that they no longer have any %A or %Z attributes in them.
- Another possible problem is that you are using the default cgi-bin on an
NCSA server or another web server that comes with a pre-made cgi script called
'date'. This can cause problems if you do not set your script to point to the
unix date command. To find out where that is, type this at your unix prompt:
which date
That should give you a path to the date command.
- The third and final possible problem could arise if you are not using
a Unix machine to run these scripts on. This is often where my scripts
fail on other machines. I have heard from many people that the following will
fix it:
At the top of the script just beneath the #! line, put the
following statement:
require "ctime.pl";
Then wherever you see the $date variable being defined, substitute it for:
$date = &ctime(time);
Hopefully one of the above solutions will help to fix any date problems you
may be having with my scripts.
Are there any sites that will host my guestbook?
There are several sites which will host your guestbook
for you if you do not have CGI access of your own or cannot get my script
to work. None of them that I know of use my guestbook, however they will
have something similar. Below are a few of the most popular:
- Pergatory
- They no longer give away free accounts, however a 30 day free trial
is available, and their server is much more reliable than others which do
allow the free guestbooks.
- Lpage.com
- This is a famous guestbook server, however many users who come to my
archive looking for a guestbook, come complaining of the speed and
downtime at Lpage. It is free, however.
[ Matt's Script Archive, Inc. ]
[ Advertising ]
[ The CGI Resource Index ]
Matt Wright - mattw@scriptarchive.com
© 1995 - 1997 Matt's Script Archive, Inc.
|