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:
if ($line eq "<!--bookmark-->")
Edit the lines to the following:
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.
[ back to toc ]