Unzip the distribution and you should see two directories cgi-bin and pages. Upload everything in cgi-bin in ASCII mode to a directory on your server that can run cgi. For example, I recommend creating a directory called links off your cgi-bin. You'll end up with a structure like: /cgi-bin/links - User cgi like search.cgi, add.cgi, etc. /cgi-bin/links/admin - All the admin programs.

helmetpastoralSoftware and s/w Development

Dec 13, 2013 (3 years and 5 months ago)

113 views

Unzip the distribution and you should see two directories cgi
-
bin


and pages. Upload everything in cgi
-
bin in ASCII mode to a directory


on your server that can run cgi. For example, I recommend creating a


directory called links off your cgi
-
bin. Yo
u'll end up with a structure


like:


/cgi
-
bin/links
-

User cgi like search.cgi, add.cgi, etc.


/cgi
-
bin/links/admin
-

All the admin programs.




Make sure all the files are transferred in ASCII mod
e!!




Upload the cascading style sheet: links.css and the background image


to the directory where you want the pages created.


2. Double check that the Path to perl is correct. Links defaults with


#!/usr/local/bin/perl




If this is i
ncorrect, you'll need to edit the first line of every .cgi


program, and change it to where you have Perl version 5 installed.


3. Set permissions:


chmod 755 (
-
rwxr
-
xr
-
x) on all .cgi files.


chmod 666 (
-
rw
-
rw
-
rw
-
) on all files in the data
directory.


chmod 666 (
-
rw
-
rw
-
rw
-
) on all your template files (if using the online editor).


chmod 777 (drwxrwxrwx) on the hits directory


chmod 777 (drwxrwxrwx) on the ratings directory


chmod 777 (drwxrwxrwx) on the directory
where Links pages will be created.


4. Edit links.cfg and set as a minimum:




-

PATH to your admin directory, this is a system path, not a URL! If you


get an error message about not finding a file, look at the SCRIPT_FILENAME


varia
ble for clues on the proper path!


$db_script_path = "/alex/links/cgi
-
bin/admin";


-

URL to your admin directory. This should start with 'http://'.


$db_dir_url = "http://localhost/links/cgi
-
bin/admin";


-

URL of where you
r user cgi is kept. If you kept the default installation,


it will just be one level below the admin directory.


$db_cgi_url = "http://localhost/links/cgi
-
bin";


-

PATH to where your pages are built. This should be a system path, not a

URL.


$build_root_path = "/alex/links/pages";


-

URL of where your pages are.


$build_root_url = "http://localhost/links/pages";




-

Set one of either:


$db_mail_path = ''; $db_smtp_server = '';



If you are on NT, set $db_smtp_server to your SMTP server. If you are on UNIX,


set $db_mail_path to your sendmail program.


-

Set the email address for who all emails will come from:


$db_admin_email = '';


5. ** Password protect your a
dmin directory. Never leave your admin directory
unprotected


in a public site, your whole directory could be erased!!



6. Give it a test! Go to: http://yourserver.com/cgi
-
bin/links/admin/admin.cgi or wherever


you setup admin.cgi, and you should se
e the admin screen. Try (in this order):




1. Add a category.


2. Add a link in that category.


3. Build pages.


4. Search for the one link, using the new pages created.


5. Add a link from the new pages created.



6. Validate a link from admin.




If everything goes ok, you should be all done!


If you run into problems, take a look at the Problems section

below and check out the Links forum at:




http://gossamer
-
threads.com/scripts/forum/



4. Pro
blems

====================================================

* 500 Server Errors.

I've tried to remove as much chance of 500 server errors as possible. If you still

get one check the following:



-

Did you upload/ftp the file up in ASCII mode?


-

Is the

path to Perl right? (#!/usr/local/bin/perl)


-

Is the path to Perl to a version of perl5?


-

Are there any syntax errors you made when editing links.cfg?


-

Are the file set to the right permissions?



500 server errors are 99% of the time caused
by: File uploaded in BINARY mode, or

path to perl is wrong or goes to perl version 5.


* Fatal Error: (Maybe you didn't strip carriage returns after a network transfer?)

You've uploaded something in BINARY mode! Make sure you transfer ALL the files

in ASCI
I mode. Don't trust your FTP programs AUTO
-
DETECT mode, but instead

transfer everything in ASCII.


* Header/Footer problems.

The script looks at whatever you have entered in the header/footer field. It first

checks to see if what you entered is a file and
if it is it will insert the contents

of that file.


If it can't find/open the file the script will insert the value. This way you can

either specify a file or some text to use as a category header/footer.


TIP: If you want the same text to appear on all
pages, don't use a header. Just put

that text into site_html.pl.


* Fatal error: unrecognized token my( ...

You have the path to perl pointing to perl version 4. Make sure it goes to perl

version 5.


Remember: Please be careful with the script as it does c
reate

directories and other potentially hazardous stuff.


Good Luck!