If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
guestbook setting up  XML
Forum Index » Support Forum
Author Message
Anonymous



Could anybody please help with the explanation of trying to set up a guestbook with the code below? I have never tried this before, but the hosting company do give you access to a cgi-bin, so thought I would try to do this myself. I am now lost.


1.Open guestbook.pl with a text editor. (I use Notepad)

Change the url in line one, to the Perl program at your server.
Usually it is: - /usr/bin/perl or /usr/local/bin/perl for Unix. ( Already the correct path for Host files}
- C:/Perl/Perl.exe for Windows (use slash "/")
Set the correct paths and required urls. (Where do you do this, In the .pl ? and what do you change ? )
2.Upload guestbook.pl in ASCII-mode to your cgi-bin directory
and change mode it to 755 (-rwxr-xr-x). (I have done this but do not understand why)
3.Open addentry..html with a text editor.
Change the line
<form method="post" action="/cgi-bin/guestbook.pl"> ( Don’t understand this either,
but I changed it to this as this was the path given by Hosting site.)

http://home/domains/mywebsite.co.uk it said without the www./user/htdocs/cgi-bin/Guestbook.pl"
to the correct location of guestbook.pl
Then nothing happens when I click on my guestbook url

Sorry but you must think I am a complete beginner, but I would appreciate any help
JTD
Graduate

Joined: 08/05/2004 21:52:50
Messages: 529
Location: Arkansas
Offline

Does your host have php installed and also does your host provide you with any databases?

LINK-> Use Lazarus Guestbook
[WWW] [Yahoo!] aim icon [MSN]
amber222
Graduate

Joined: 07/05/2004 21:13:07
Messages: 586
Offline

You are using the cgi version, while most of us are using the php version, which requires Php and databases.

I have not actually seen the version you are using, but will try to help.

1. Set the correct paths and required urls. (Where do you do this, In the .pl ? and what do you change ? )


Yes in the guestbook.pl file. The Perl path is the first line that looks something like this:

#!/usr/bin/perl

Don't change anything there except the path, if necessary. If you have CPanel, the Perl path should be shown there. Also look through the file to see if the path to your guestbook is required anywhere else. If so, add it.

2. Upload guestbook.pl in ASCII-mode to your cgi-bin directory
and change mode it to 755 (-rwxr-xr-x). (I have done this but do not understand why)


This is changing the file permissions. The following post explains how the file permissions work: http://proxy2.de/forum/viewtopic.php?t=3520

3.Open addentry..html with a text editor.
Change the line
<form method="post" action="/cgi-bin/guestbook.pl"> ( Don’t understand this either,
but I changed it to this as this was the path given by Hosting site.)
http://home/domains/mywebsite.co.uk it said without the www./user/htdocs/cgi-bin/Guestbook.pl"
to the correct location of guestbook.pl
Then nothing happens when I click on my guestbook url


Hopefully you changed the stuff like mywebsite to the real names and didn't put the user info. Some servers, like the one I am on, do not recognize the .pl extension, and it must be changed to .cgi. So maybe that is the problem. I don't know. If this is necessary for your server, it looks like you will not only have to change the name of the guestbook.pl file to guestbook.cgi, but you would also have to open addentry.html and change any reference to guestbook.pl to guestbook.cgi.

Sorry but you must think I am a complete beginner, but I would appreciate any help


We were all beginners once. We only learned what we know now by trial and error and asking a lot of questions.

If you get any error messages, copy them so you can post them here to get help.
Anonymous



Thank you for answering my post. I have copied it to a notepad and will have a look at it slowly to see if I can grasp it.
I have copied what the host has let me know so perhaps you may see something I have overlooked, or more to the point what I don't understand.

web hosting
Results of your knowledge base search

My perl/cgi script asks for the absolute path to my site, what is this?

/home/domains/mydomain.com/user/htdocs

where mydomain.com is the name of your domain without the www..

web hosting

What is the path to Perl?

/usr/bin/perl

Linux Features:
- CGI, C, Perl AND Python scripting support: CGI scripts are small applications that run within your webspace and can provide interactivity. Common CGI scripts include Guestbooks and Forms. Our servers support the three most popular CGI scripting languages, Perl, C/C++ and Python.

All our servers run on brand new Windows 2003 and Linux Redhat.
I can't find out what system my site is using Linux or Windows
amber222
Graduate

Joined: 07/05/2004 21:13:07
Messages: 586
Offline

Can you post your url, or if you don't want it to show on this forum, email it to me?
Anonymous



Thank for keep helping me. I wrote the site free, for a new band and they couldn't afford an expensive hosting site so I uploaded this to streamline net for two years quite cheap. here is the url to check the source
http://www.1waytraffic.co.uk/home.htm
and more informsation from the hosts
This is the top part of the script that I downloaded from this site


#!/usr/bin/perl
#########################################################################
# Guestbook v1.51 #
# Copyright (c)2000 Chi Kien Uong #
# URL: http://www.proxy2.de #
# #
# This Software is distributed under the GNU General Public #
# License. For more details see license.txt #
# #
# Administration: #
# http://www.host.com/cgi-bin/guestbook.pl?admin=enter # Do I need to change this?
# #
# For more stuff visit --> http://www.proxy2.de #
#########################################################################

# url of script
$cgiurl = "http://localhost/cgi-bin/guestbook.pl"; Do I need to change this?

# base url to all guestbook files without trailing "/"
$bookurl = "http://localhost/book"; Do I need to change this?

# base directory to all guestbook files from the server root without trailing "/"
$base_dir = "/home/usr/you/book";

# name of guestbook files
$book_file = "guestbook.html"; Do I need to change this?
$id_count = "guest_id.txt";
$page_count = "page_id.txt";
$sample = "template.html";
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

www.web-mania.com does cheap webhosting. £20 a year gets you 500megs of space, 6Gb bandwidth, PHP, Perl, MySQL. Pretty much everything you need. Could use Advanced guestbook then.

Oh and visit http://gtmcknight.com/buttons/validated.php for some nicer valid code buttons.
Yes you need to edit the first three variables.

I'm guessing you are meant to install the script in a different place from the rest of the files. Simply put in the addresses you would use to visit the script and then the address for the guestbook files.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
Anonymous



I had a job to get them to pay for the hosting site I put them with and that was only £29.99 for two years. I had a look at the sites you mentioned carbonize, and the buttons are not bad. I can make them in photoshop quite easily but I made their site as simple as possible for free, so won't be going over the top. It takes me a lot of time as I write everything by hand in notepad, but I am retired so have the time.
I have to upload the script to the same folder as the guestbook.pl which is the cgi folder, and that one is called book
amber222
Graduate

Joined: 07/05/2004 21:13:07
Messages: 586
Offline

Interesting... clicking on your guestbook forwards me to NASA! Far out. The moon... Mars... and beyond!

Did you find out if you can use the .pl extension on your server or if it has to be .cgi? The guestbook.pl file (or guestbook.cgi if you need to change it) must go in the directory called cgi-bin.

Try making some changes:

# Administration: #
# http://www.host.com/cgi-bin/guestbook.pl?admin=enter # Do I need to change this?
# #


Change the above to: http://www.1waytraffic.co.uk/cgi-bin/guestbook.pl?admin=enter or,

if your server does not recognize .pl extensions, you need to change it to:

http://www.1waytraffic.co.uk/cgi-bin/guestbook.cgi?admin=enter

----

On all the others you listed that begin with: "http://localhost/, change localhost to www.1waytraffic.co.uk. Leave the other stuff in those lines as it is.

# base directory to all guestbook files from the server root without trailing "/"
$base_dir = "/home/usr/you/book";


Your host should have given you (or allowed you to set up) a unique user name. This is probably the same username used to log into your CPanel or FTP. In the above, replace "usr" with that actual username.

This usually includes the /public_html/ directory... Is that the directory you go to when you want to see the list of directories and documents for your site? If so, include public_html in the above line, so you should end up with something like this:

$base_dir = "/home/your username/public_html/book";

where "your username" is your actual username and "book" is the name of your guestbook directory.

# name of guestbook files
$book_file = "guestbook.html"; Do I need to change this?
$id_count = "guest_id.txt";
$page_count = "page_id.txt";
$sample = "template.html";


You should not have to change any of this information.

I think the php version is a lot easier. Do you have CPanel?
amber222
Graduate

Joined: 07/05/2004 21:13:07
Messages: 586
Offline

I was able to see your actual cgi file online., and it is .cgi. So make the changes using the .cgi extension:

http://www.1waytraffic.co.uk/cgi-bin/guestbook.cgi?admin=enter

Change your base directory:
  • $base_dir = "/home/your username/public_html/book";

  • (where "your username" is your actual username and "book" is the name of your guestbook directory.)

    Also change the code to disallow html; otherwise someone could send some malicious code. (below you are just changing the 2 to a zero):

    change:

    To:

    Change the link to the guestbook that is on your home page. Right now it shows this:



    Change it to this:



    or just using book/guestbook.html should work

    Anonymous



    Hi Amber funny you should say that about nasa far out. I just tried it in Firefox and got the same thing, but not in I/E weird. Mind you it was a good jump. Will look at what you have just posted now, if I can't seem to get the hang of this scripting, I will have to resort to a free off host guestbook for them. I just wanted to learn this as well. all my learning so far has just come from reading books.
    Carbonize
    Master
    [Avatar]

    Joined: 12/06/2003 19:26:08
    Messages: 4292
    Location: Bristol, UK
    Offline

    Anonymous wrote:I had a job to get them to pay for the hosting site I put them with and that was only £29.99 for two years. I had a look at the sites you mentioned carbonize, and the buttons are not bad. I can make them in photoshop quite easily but I made their site as simple as possible for free, so won't be going over the top. It takes me a lot of time as I write everything by hand in notepad, but I am retired so have the time.
    I have to upload the script to the same folder as the guestbook.pl which is the cgi folder, and that one is called book


    Yup I do all my coding by hand except I use Topstyle pro and Ultraedit. I can't remember the last time I actually got paid for my work. As Amber says check what extension your host wants with Perl files.

    Carbonize
    I am not the maker of the Advanced Guestbook

    get Lazarus
    [Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
    amber222
    Graduate

    Joined: 07/05/2004 21:13:07
    Messages: 586
    Offline

    If you don't mind giving up FTP access or CPanel access if you have it, we could get this going for you. You can always change your passwords later.
    Anonymous



    PS Amber The only reason you saw cgi in the source file was the fact I was trying out what you said in a previous post, it is really a .pl file.
    amber222
    Graduate

    Joined: 07/05/2004 21:13:07
    Messages: 586
    Offline

    Yea? It appeared to work. So you know for sure that your host uses .pl?

    Well, now your file ends in .pl but the codes inside end in .cgi. They must match. So if .pl is correct, you have to change the entries back to .pl also.

    Are you understanding what I meant earlier? Some web servers don't recognize the .pl extension. That's why you have to find out from your host which is the correct extension and use it. For example, my server won't recognize .pl so anytime a file has that extension, I have to change every instance of .pl to .cgi. If your server does recognize .pl, you don't have to go through that step.
     
    Forum Index » Support Forum
    Go to:   
    Based on the open source JForum