[ back to toc ]


Date: 2002/01/23 16:04

I'm trying to run a guest book script (bnbbook.cgi from
http://www.bignosebird.com ) Everything works , except that it does not
write the comment back to the guestbook page.
The script is here http://www.carlasings.com/bnbbook.zip

The page is here

Permissions are set as instructed, the error log shows no new errors,
<!-bookmark-> (where the entrys should begin )is on it's own line, in a
table by itself.
Don't know what else to try.
This guestbook program relies on the initialized guest book, and requires
that the <!-bookmark-> is on a single line alone. I know that you have
checked it, however:

did you upload the file to the server (the initial guest book) in ASCII
mode. If you uploaded it binary mode then there is an extra \r character
after the chop.


Thanks for your prompt reply, Peter.
Yes, it was uploaded in ASCII mode.
The only other thing I've noticed, is that when it was producing entrys
to the error log, ( it no longer does that) it added to the address, so :
Correct path : "/home/carlasings/public_html/gb.htm"

The error log showed : "/home/carlasings/public_html/public_html/gb.htm"

The error log, however does not show line numbers...
At this time, it produces no error messages, either in the server log, or
the custom messages in the script. All other functions are fine. It sends
notification, thank you, word filter works, etc.
Any other ideas, or is this a do-over ?
There are two lines in the code that says:

chop $line;
if ($line eq "<!--bookmark-->")

Edit the lines to the following:

chomp $line;
if ($line =~ /<!--bookmark-->/ )


Is there anything else in the guestbook file or this only line? It may
happen that the initial guestbook file does not contain any \n characters
at all. chop however takes one character off the end of the variable (as
opposed to chomp that takes only \n character if there is any thus it is

If there is no \n character at the end of the line containing
<!--bookmark--> (if that is the last line and unterminated) then it
becomes <!--bookmark-- after the chop.

If even this does not help, do not hesitate to ask me. It is not a do-over
so long as long it does not work.

If you are desperate and trust me, you can give me login details and I can
try to fix it during weekend.


Thanks, again, Peter. But no joy.
Still does not write back to the guestbook page.
Only new error message on the server log is about a rollover .gif it says
does not exist, but shows up on the page. ( I assume that's unrelated. )
No, Im not desperate ( yet ) but I would like to get it working without
dominating all your time. Perhaps it's something in the page code ?
Prehaps another guestbook script is in order ? I dunno...

Appreciate all your time,

Well, that is the art of debugging. Please step by step cross check all
settings. Have someone, may not be an expert, who you can explain all your
settings sitting near you. Many times it happens that you realize that you
made a mistake when you explain it to someone what is going on.


[ back to toc ]