CGI Basic tutorial
By
Aleck
We will speak about proper installation of cgi-scripts, I've heard that this is rather complex for most people.
Okay, 1st thing we should take of about is proper unzipping. Usually scripts come in zip-packages, open 'em in WinZip for Windows9x/NT, that supports long filenames, check all filenames and folder names (no filenames like longfi~1.dat should appear)
2nd step, rather complex sometimes, is to set all variables as mentioned in the script's manual
Usually most problems come with the full path to script. If you have telnet access to your server (usually that's true for serious hosting providers) log in and type 'pwd' you will receive the full path to your home folder (something like /usr/ web/ users/ thatdude/) in most cases add /domainname/cgi-bin /scriptname/ to that path and your will be ok, but you can always ask your system administrator, it will take exactly 2 seconds to type an answer in icq window and press Alt-S :-)
Next step is uploading, make sure you are using ASCII mode for all cgi files (same for .pm, .txt. usually all files in cgi-package are in text format, but data files (.dat) can be in binary one (check script's manual to find out this). Graphic files like .jpg, .gif & .png always are in binary mode, archives .zip, .gz are too
Very important step, 90% of all problems are here. Set proper permissions. Usually manual gives you full information about this, but keep in mind that all cgi scripts should have 755 mode, data files 666 and folders 777. this will work in 99.5% of the cases.




