Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

guestbook settings

Status
Not open for further replies.

jvuz

IS-IT--Management
May 26, 2003
23
0
0
BE
Hello everyone,

I'm having a problem with my guestbook I dowloaded from Matt's Scrip Archive. The perl file asks to change some settings and that's where I'm a bit stuck.

These are the settings:

$guestbookurl = "$guestbookreal = "/home/yourname/public_html/guestbook.html";
$guestlog = "/home/yourname/public_html/guestlog.html";
$cgiurl = "$date_command = "/usr/bin/date";

guestbook.html=>

guestlog.html=>

guestbook.pl=>



Can anyone help me out please?

Thanx in advance,

Jvuz

Jvuz
 
I think you're going to have to let on what the problem is before anyone can help you. Does it compile? Does it produce an error message? Does it silently fail? Have you given us the settings you inherited? the settings you want? both? in which order?

It would be very helpful if you read Mike's excellent FAQ on how to ask questions - faq219-2889 - before proceeding.

Yours,

fish

["]As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.["]
--Maur
 
Just click here and you see the error message (if it's not in english I'll translate: the server encounterd an internal error or bad configuration and couldn't execute the command)

This is the beginning of the perl file (if needed I post the whole file):

#!/usr/bin/perl
##############################################################################
# Guestbook Version 2.3.1 #
# Copyright 1996 Matt Wright mattw@scriptarchive.com #
# Created 4/21/95 Last Modified 10/29/95 #
# Scripts Archive at: #
##############################################################################
# COPYRIGHT NOTICE #
# Copyright 1996 Matthew M. Wright All Rights Reserved. #
# #
# Guestbook may be used and modified free of charge by anyone so long as #
# this copyright notice and the comments above remain intact. By using this #
# code you agree to indemnify Matthew M. Wright from any liability that #
# might arise from it's use. #
# #
# Selling the code for this program without prior written consent is #
# expressly forbidden. In other words, please ask first before you try and #
# make money off of my program. #
# #
# Obtain permission before redistributing this software over the Internet or #
# in any other medium. In all cases copyright and header must remain intact.#
##############################################################################
# Set Variables

$guestbookurl = "$guestbookreal = "/home/yourname/public_html/guestbook.html";
$guestlog = "/home/yourname/public_html/guestlog.html";
$cgiurl = "$date_command = "/usr/bin/date";

Jvuz
 
My problem is what I need to fill in for
$guestbookreal = "/home/yourname/public_html/guestbook.html";
and
$guestlog = "/home/yourname/public_html/guestlog.html";

That's not clear for me

Jvuz
 
Just click here

where?

If you get the error message "the server encounterd an internal error or bad configuration and couldn't execute the command" then one (or more) of the following is wrong:

* wrong URL
* script not in correct cgi binaries directory
* server not configured to run scripts
* script not executable (file permissions)
* script does not compile (perl syntax)
* script does not return valid HTML headers

You'll need to get this issue sorted before you can make any useful progress with your configuration problems.

A useful trick is to include
Code:
use CGI::Carp qw/ fatalsToBrowser /;
near the top of your code. Another is to try running the script from the command line on the server and see what happens.

Please note that the script is ten years old. Perl has changed a lot in that time, as have some relevant semantics of URLs.

["]As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.["]
--Maur
 
Why is that for CODE
use CGI::Carp qw/ fatalsToBrowser /;
(just to know, what does it do)

Do you know another, a better script for having a guestbook?

Jvuz
 
Code:
use CGI::Carp qw/ fatalsToBrowser /;
does what it says on the tin and diverts fatal error messages to your browser (with properly formatted headers) rather than poterntially losing them in a web server log file.

Indispensable for web development.

Yours,

fish

["]As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.["]
--Maur
 
Hello, thanx for the help. My problem is solved, but I didn't use the script. I used another script in php, a simple script, that I later can add things to. But thanx for all the help.

Jvuz

Jvuz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top