- T@mil elta etwrk -

HomeHome  Portal*Portal*  GalleryGallery  FAQFAQ  RegisterRegister  Log inLog in  

Share | 

 Installing CGI-Scripts

Go down 
T'$pace Mod
T'$pace Mod

Number of posts : 196
Age : 31
Location : malaysia
Job/Studies : student and work
Language : English,Tamil,Malay
Registration date : 2007-12-03

Character sheet
Gold: 20
Nick name:

PostSubject: Installing CGI-Scripts   Fri Dec 07, 2007 5:12 pm

For many new webmaster this is probably one of the most daunting tasks they'll need to do. Mainly because you're not used to the UNIX environment, but also because you have to edit some perl scripts to make the script work. Here are the basic things you need to install CGI-Scripts.

1. You need a web host that gives you a cgi-bin, most free hosting companies won't give you a cgi-bin because of security reasons. If you're on a free web host and you want to add things like a guestbook or message boards, I would suggest you use a service like www.bravenet.com they have codes that you just cut and paste. Good thing, it's easy, bad thing, it has advertising and it generally makes your page look a little less professional.
2. You'll need the script itself. You can download almost any cgi-script for free at www.cgi-resources.com this is where I go to get any scripts that I'll need for the websites I write.
3. You'll need a plain text editing program. If you're in a windows operating system Notepad would be fine to edit perl / cgi scripts. (Don't use Word, Wordpad or any other "rich text" type program, it will screw up the script).
4. You'll need an ftp program, this is a program that will upload your page to your server. I like WS_FTP Pro, you an use the lite version of this program, which is free, but this pro version offers more features and easier to use I think.

Okay, so that's what you'll need, now here is the important things you'll need to know about installing the scripts:

1. Always read the included installation instructions. All scripts come with a readme.txt file or some form of installation instructions. Read these carefully, because they'll tell you how and what you need to do for this script.
2. Knowing the perl path for your server. In all cgi scripts the script itself will need to know where the perl kernel is. In most cases the perl path is /usr/bin/perl and most people that write scripts will point it here, contact your web host if you're unsure of where the path to your perl kernel is
3. Make sure to upload the .cgi files to the cgi-bin on your server. Almost all the servers I've been on makes you upload your scripts to a separate folder called the cgi-bin. If you upload your script elsewhere it just won't work (note, on some servers they do allow you to put the cgi-scripts in any directory, but it's been my experience that most have the separate cgi-bin).
4. When uploading CGI, make sure that you upload it in ASCII, not BINARY, if you upload it in Binary the script will not work. Binary is for photos and regular pages, but for scripts you'll need to upload it in ASCII format.
5. Know the root to your cgi-bin and also the public_html files. Most of the times the path will look like /home/username/domain name/public_html and the root to your cgi-bin will look like /home/username/domain name/cgi-bin - Once again, you'll need to contact your web host if you're unsure. Also, some scripts will point to the cgi script by having the url and not the root, pay attention to what the script asks, because sometimes it will be the url where the script is located, like, http://www.yourdomain.com/cgi-bin/scriptname.cgi
6. Knowing your sendmail path. This is for scripts that will allow users to email or perhaps if the program emails you if someone posts messages etc. The send mail path is usually /usr/lib/sendmail once again, if you don't know contact your web host or check their FAQ, they usually give this information there.
7. Knowing how to chmod or set permissions to files and directories. All the scripts you download will tell you to set permissions to your scripts and files, you must do this! If they say to set the permission to a certain number, you must do so! If you don't, the script won't work! In the different ftp programs there are different ways to set permissions, usually most will have where you can right click on the file and there will be a permissions button or a chmod button and then you can set the permissions that way.
8. Contact your Web host if you have trouble...always remember that you're paying for a service and most places offer technical support, don't be too shy to ask for help, that's what technical support is there for and especially if you're paying for the service you should use the service as much as you can!

These are the basics you need to know, each script is different, some programmers really go out of their way to make the script easy to install, some programmers write great scripts but give lousy instructions, so, just try out some scripts, don't be scared of them, and don't give up on them, because the first few times, you'll almost always get errors, trust me, I should know!

One other thing, I found with my own webhosting company that they weren't that willing to give cgi help, I think that's sort of lame to tell you the truth. A company that offers services should be knowledgeable on such topics, but you often find tech support usually knows less than you and that you're on your own most of the times.

I've installed lots of scripts now and there are a few that I'll use over and over again because they're just so easy to install and really work great. If you want some help in this area I can point you to the easiest to install cgi-scripts, just tell me what your looking for or I'll write a tutorial on what scripts to use. Have fun, don't get frustrated, and don't give up, you'll get the hang of the cgi-scripts soon enough Surprised) All da best "MoGa"
Back to top Go down
View user profile
Installing CGI-Scripts
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
- T@mil elta etwrk - :: General Talk :: Computer-
Jump to: