Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

is there anyone who'll set this up for a fee??

Quote Reply
is there anyone who'll set this up for a fee??
Hi
is there anyone out there who can set this damn thing up for a fee?
I've spent two whole days wasting my time trying. The sheer number of people struggling to install links 2 indicates that there may be a need for this.
I haven't been able to get to the admin screen even, at first it couldn't find links.cfg and now all i get is 500 server errors, all the time and i've tried everything i can possibly think of, and read as many posts as i thought relevant.
I want to get it running, but can't really waste any more time, you know?
i think my web hosts may have given me the wrong absolute path, but then, they should know, right ?
(they gave me /www/vhtdocs/eurodead/cgi-bin/links/admin/links.cfg - sound about right?

any help/advice that will actually help most welcome
Thanks,
A very frustrated Alan

Quote Reply
Re: is there anyone who'll set this up for a fee?? In reply to
Ok, if your having trouble finding perl and correct paths, run this sample script:

Code:
#!/usr/local/bin/perl
print "Content-Type: text/html\n\n";

$perl = `which perl`;
print "<b>$perl</b>
Where Perl is located on your server

\n";

$current = `pwd`;
print "<b>$current</b>
Where this script is located

\n";
Copy and paste, name it whatever you want with .pl or .cgi extension. Make sure and put it in your cgi-bin, and chmod 755. Call it from your browser. If you get a five hundred error change the first line to #!/usr/bin/perl. Also, the formating might be messed up on this post, so if there is a long line it will be broken. Example print "Broken line
\n"; That's all one line, basically everyline that ends with a semicolon belongs together.
Hope this helps,
Paul


http://www.fullmoonshining.com for Pearl Jam Fans
Quote Reply
Re: is there anyone who'll set this up for a fee?? In reply to
thanks
my web hosts gave me incorrect information!
now my admin works ok but from the created pages the ADD, MODIFY, SEARCH etc throw up internal 500 errors.
What needs changing?
i have already amended the absolute paths to links.cfg in each of them, and uploaded in ascii, set permissions to 755.
What else is there ?
thanks
Alan

Quote Reply
Re: is there anyone who'll set this up for a fee?? In reply to
You've probably already done this but you might check to make sure the top line #/usr/bin/perl in each script, or whatever it is in your case, is the same as the admin.cgi.

Later,
Paul

http://www.fullmoonshining.com for Pearl Jam Fans
Quote Reply
Re: is there anyone who'll set this up for a fee?? In reply to
Thanks for the suggestion, but yes i already have that one covered.
is it worth me posting my links.cfg and add.cgi files here for some wise people like your good selves to inspect?
Thanks
Alan

Quote Reply
Re: is there anyone who'll set this up for a fee?? In reply to
Hello

Have U read the FAQ about permissions,
there are more permissions than in readme to change,
like data directory...

ciao

Quote Reply
Re: is there anyone who'll set this up for a fee?? In reply to
Cranepaul, your script should be in the ressource center :o)

very cool script :o)

Quote Reply
Re: is there anyone who'll set this up for a fee?? In reply to
Thanks, and Yep, i have the whole big list of permissions printed out here, and i checked 'em all and they're all correct.
I know it's probably something small somewhere that I'm overlooking, or something that hasn't been configured.
At the moment I'm still on a high just because i got to the admin screen OK ;-)
as the song goes: we will get by, we will survive


Quote Reply
Re: is there anyone who'll set this up for a fee?? In reply to
OK. I'm gonna assume that the search, modify, add etc are in the cgi-bin/links/ directory and not the cgi-bin/links/admin/ directory. If there in the right spot, you might change the line that reads require "admin/links.cfg"; to /absolute/path/to/yourserver/cgi-bin/links/admin/links.cfg
Hopefully that will helpSmile,
Paul


http://www.fullmoonshining.com for Pearl Jam Fans
Quote Reply
Re: is there anyone who'll set this up for a fee?? In reply to
Thanks but i did that already (picked up on earlier posts to try that one)
It's really frustrating.
I re-checked my permissions and they all seem fine.
Help ???
Alan

Quote Reply
Re: is there anyone who'll set this up for a fee?? In reply to
Sorry I haven't got back. What are the permissions for your directories inside your cgi-bin. Mainly the links one. If it's set to 777 try setting it to 755. Some servers are picky about this. Most of the time paths and permissions give these errors, like you said it's probably something simple, let me think about this a little longer.
Later,
Paul

http://www.fullmoonshining.com for Pearl Jam Fans
Quote Reply
Re: is there anyone who'll set this up for a fee?? In reply to
Thanks again, but no, it still throws up 500 server errors.
Incidentally, the full set of file permissions text , as in the FAQ, indicates that it should be 755 anyway (so it already was) but i tried the opposite of what you said, 777 and that didn't work either)
I'm trying to remain optimistic, I so much *want* to get it working.
Someone has told me that you have to set your email to name/@host.com (note the slash) - is this true?
also does the path to sendmail have to be a full absolute path ?

Quote Reply
Re: is there anyone who'll set this up for a fee?? In reply to
The email path should look something like this /usr/sbin/sendmail, depending upon what server you are using. The /@ is usually correct if it is inside the actual script I believe, because it is in the links.cfg you shouldn't need the /. What kind of server are you running on.

http://www.fullmoonshining.com for Pearl Jam Fans
Quote Reply
Re: is there anyone who'll set this up for a fee?? In reply to
Here's another small suggestion. Try checking the permissions on the templates in the /admin/templates directory. Set them to 777. Also, if that doesn't work could you post your links.cfg
Later,
Paul

http://www.fullmoonshining.com for Pearl Jam Fans
Quote Reply
Re: is there anyone who'll set this up for a fee?? In reply to
I am on an Apache server,if that helps.
I tried the template file to 777, guess what? - no change.
I came across something else weird - in my admin screen when i clicked on detailed verification it failed to find some file in Lwp directory, so I renamed the directory LWP and then it worked (even though it's called Lwp in the readme files) - ARE Folder names case sensitive ?? If so , should they be all lower case ?

Here is my links.cfg file, thank you so much for trying so hard to get this running for me. I am increasingly getting the feeling that I am missing something really stupid. You know, when you can't see the wood for the trees....

# Paths and URL's to Important Stuff
# --------------------------------------------------------
# PATH and URL of Admin CGI directory. No Trailing Slash.
$db_script_path = "/www/vhtdocs/thomaau/eurodead/cgi-bin/links/admin";
$db_dir_url = "http://www.eurodead.net/cgi-bin/links/admin";

# URL of User CGI directory. No Trailing Slash.
$db_cgi_url = "http://www.eurodead.net/cgi-bin/links";

# PATH and URL of Pages to be built. No Trailing Slash.
$build_root_path = "/www/vhtdocs/thomaau/eurodead/pages";
$build_root_url = "http://www.eurodead.net/pages";

# PATH and URL of What's New page. No Trailing slash.
$build_new_path = "$build_root_path/New";
$build_new_url = "$build_root_url/New";

# PATH and URL of What's Cool page. No Trailing slash.
$build_cool_path = "$build_root_path/Cool";
$build_cool_url = "$build_root_url/Cool";

# PATH and URL of What's Rating page. No Trailing slash.
$build_ratings_path = "$build_root_path/Ratings";
$build_ratings_url = "$build_root_url/Ratings";

# Database Options
# --------------------------------------------------------
# You really need to use flock(). However if your system doesn't support it (Win95),
# then turn this off at your own risk!
$db_use_flock = 1;
# Use Pragma: no-cache to stop browsers from caching output? (0 = cache, 1 = nocache)
$db_nocache = 0;
# Use IIS headers? Set this to 1 if your web server needs the full headers (HTTP/1.0 etc.)
$db_iis = 0;
# Field number of category in category.db
$db_main_category = 1;
# Referers -- which hosts are allowed to add to your database.
@db_referers = ('www.eurodead.net', 'eurodead.net');

# Email Options
# --------------------------------------------------------
# NOTE: Be sure to edit the text of the message. It can be found
# in the templates directory: email-add.txt, email-del.txt and
# email-mod.txt respectively.

# Set only ONE of either $db_mail_path which should go to a
# mail program like sendmail, or $db_smtp_server which will use
# a SMTP server. Do not set both at once!

# PATH of sendmail. # SMTP Server
$db_mail_path = '/bin/sendmail'; $db_smtp_server = '';

# Email address of the administrator. BE SURE TO SET!
$db_admin_email = 'admin@eurodead.net';

# Notify visitors automatically when their links are validated?
$db_email_add = 0;

# Notify visitors automatically when their links are modified?
$db_email_modify = 0;

# Log all outgoing messages? Put the full path to a logfile and make sure it
# exists and is writeable (chmod 666 -rw-rw-rw-). This logfile can get pretty
# big!
$db_mailer_log = '/www/vhtdocs/thomaau/eurodead/cgi-bin/links/admin/mailer.log';

# Build Options
# --------------------------------------------------------
# Setting for popular cutoff, can either be a percent (i.e. top 3%), or
# a fixed value (i.e. top 10). Enter 0.03 or 10 respectively.
$db_popular_cutoff = 0.03; # Top 3%
# Number of days a link is considered New.
$db_new_cutoff = 14; # 14 days old.
# Return search results bolded (1 = yes, 0 = no).
$search_bold = 1;
# The name of an index file.
$build_index = "index.html";
# The extension to use for non index files:
$build_extension = ".html";

# Should your add.cgi automatically select what category the user
# is adding his link into?
$db_single_category = 1;

# Directory Permissions. Do NOT put quotes around it. Set to 0777
# for world writeable. If you put this at 0755, you might need a
# script to remove any directories created as they will be owned
# by the web server or user nobody. Better solution might be to
# run the nph-build routine from the command shell.
$build_dir_per = 0777;

# The script can now break up category pages that have more then x
# number of links in it. It will also create next and previous links
# to help navigate. Set this to 1 if you want to break up pages or 0 if
# you want to have only one page per category.
# Setting this to one, will also break up the What's New pages into
# per day sections (not affected by number of links per page).
$build_span_pages = 1;

# Number of links per page.
$build_links_per_page = 10;

# Detailed View: The script can build a single html page per link. This is
# great if you have a review in your database. To enable, you must set
# the directory where all the pages will be stored, the url to that directory
# and set the enable option.
$build_detailed = 0;
$build_detail_path = "$build_root_path/Detailed";
$build_detail_url = "$build_root_url/Detailed";

# Use Templates: instead of editing site_html.pl, you can edit regular html pages
# encoded with special <%links_tags%>. It's not as flexible as site_html.pl, but it
# may be easier.
$build_use_templates = 1;

# Site Title, the default title to use. You should really spend some time customizing
# the directory though!
$build_site_title = 'Eurodead.net links directory';

# Date Routines
# --------------------------------------------------------
# Your date format can be whatever you like, as long as the following
# two functions are defined &date_to_unix and &unix_to_date:
# The default is dd-mmm-yyyy.

sub date_to_unix {
# --------------------------------------------------------
# This routine must take your date format and return the time a la UNIX time().
# Some things to be careful about..
# timelocal does not like to be in array context, don't do my($time) = timelocal (..)
# int your values just in case to remove spaces, etc.
# catch the fatal error timelocal will generate if you have a bad date..
# don't forget that the month is indexed from 0!
#
my $date = shift; my $i;
my %months = map { $_ => $i++ } qw!Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec!;
my ($day, $mon, $year) = split(/-/, $date);

exists $months{$mon} or return undef;
$day = int($day); $year = $year - 1900;

require Time::Local;
my $time = 0;
eval {
$time = &Time::Local::timelocal(0,0,0, $day, $months{$mon}, $year);
};
if ($@) { die "invalid date format: $date - parsed as (day: $day, month: $months{$mon}, year: $year). Reason: $@"; }
return $time;
}

sub unix_to_date {
# --------------------------------------------------------
# This routine must take a unix time and return your date format
# A much simpler routine, just make sure your format isn't so complex that
# you can't get it back into unix time.
#
my $time = shift;
my ($sec, $min, $hour, $day, $mon, $year, $dweek, $dyear, $tz) = localtime $time;
my @months = qw!Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec!;
$year = $year + 1900;
return "$day-$months[$mon]-$year";
}

sub long_date {
# --------------------------------------------------------
# This routine is for printing a nicer date format on the what's new page. It should
# take in a date in your current format and return a new one.
my $time = shift;
$time = &date_to_unix ($time);
my ($sec, $min, $hour, $day, $mon, $year, $dweek, $dyear, $tz) = localtime $time;
my @months = qw!January February March April May June July August September October November December!;
my @days = qw!Sunday Monday Tuesday Wednesday Thursday Friday Saturday!;
$year = $year + 1900;
return "$days[$dweek], $months[$mon] $day $year";
}

# -------------------------------------------------------------
# Extra Paths -- unless you feel the need to rename files, you
# can leave this as is.
# -------------------------------------------------------------
$db_script_url = $db_dir_url . "/admin.cgi"; # Admin script.
$db_header_path = $db_script_path . "/header"; # Place to store header and footers.
$db_footer_path = $db_script_path . "/footer";
$build_search_url = $db_cgi_url . "/search.cgi"; # URL of search script.
$build_add_url = $db_cgi_url . "/add.cgi"; # URL of add script.
$build_modify_url = $db_cgi_url . "/modify.cgi"; # URL of modify script.
$build_jump_url = $db_cgi_url . "/jump.cgi"; # URL of jump script.
$build_email_url = $db_cgi_url . "/subscribe.cgi"; # URL of email update script.
$build_rate_url = $db_cgi_url . "/rate.cgi"; # URL of rate script.
$db_mail_url = $db_dir_url . "/nph-email.cgi"; # URL of admin mass mail script.
$build_css_url = $build_root_url . "/links.css"; # URL to your CSS file.

$db_lib_path = $db_script_path; # PATH of library files.
#$db_links_name = "$db_script_path/data/links.db";
$db_links_name = $db_lib_path . "/data/links.db";
# PATH to links database.
$db_category_name = "$db_script_path/data/categories.db"; # PATH to category database.
$db_valid_name = "$db_script_path/data/validate.db"; # PATH to validation database.
$db_modified_name = "$db_script_path/data/modified.db"; # PATH to modification database.
$db_url_name = "$db_script_path/data/url.db"; # PATH to URL lookup database.
$db_email_name = "$db_script_path/data/email.db"; # PATH to email database.
$db_links_id_file_name = "$db_script_path/data/linksid.txt"; # PATH to links counter file.
$db_category_id_file_name = "$db_script_path/data/categoryid.txt"; # PATH to category counter file.
$db_hits_path = "$db_script_path/data/hits"; # PATH to hits directory.
$db_template_path = "$db_script_path/templates"; # PATH to templates.
$db_rates_path = "$db_script_path/data/rates"; # PATH to ratings.
1;

Really hope this helps.
Thanks a lot
Alan

Quote Reply
Re: is there anyone who'll set this up for a fee?? In reply to
The directories are case sensitive. You can tell what they should look like by looking at what you have on your home computer. That is, what they were named when you unzipped links. Your links.cfg looks fine. I don't really know what could be left. Usually it permissions, path to perl etc. but since those are covered there's not much left. I'll keep trying. Actually, do you have access to your server's error logs. If so take a look at them. You might have to ask the host for them. Sometimes you can login with telnet and type checkerrlog and that will show you the errors. Hopefully you will be able to get this.
Good luck, let me know if you have access to the logs.
Later,
Paul

http://www.fullmoonshining.com for Pearl Jam Fans
Quote Reply
Re: is there anyone who'll set this up for a fee?? In reply to
I made them all the same as when they unzipped, but the verify thing with Lwp didn't work. I renamed the folder LWP and it did work. Explain that?
Anyway I've tried everything and my add, modify, search.cgi etc just isn't happening.
Should I start again from scratch (for the third time) ??
I noticed other people have resorted to this and it has worked for some.
It's increasingly annoying seeing everybody else get their problems fixed and I still have the same problem over a week later.
Thanks for everyone's efforts, it's greatly appreciated.
Alan

Quote Reply
Re: is there anyone who'll set this up for a fee?? In reply to
I don't know that might be your only option. The LWP directory should be in all uppercase. Just remember that everything is case sensitive. Have you tried just uploading the add, modify and search scripts again. I know its a pain. I think it took me over a week, on and off trying, to finally get it working right. There's just so much going on in the program that something little can bring the whole thing down. I did go to your site and try things out and like you said everything worked except for what you mentioned. If you could get access to the errorlog it would maybe yield some clues.

Don't give up, we'll get it working. Trust me it's worth it. It's a great program.

Also, here's and alternate readme someone posted awhile back:

/cgi-bin/links/

* add.cgi
* jump.cgi
* modify.cgi
* rate.cgi
* search.cgi
* subscribe.cgi

(All set to 755 (rwxr-xr-x)

/cgi-bin/links/admin/

* admin.cgi
* admin_html.pl
* category.def
* db.pl
* db_utils.pl
* links.cfg
* links.def
* Mailer.pm
* nph-build.cgi
* nph-email.cgi
* nph-verify.cgi
* site_html.pl
* site_html_templates.pl
* Template.pm
* Validator.pm

(All .cgi files set to 755 (rwxr-xr-x). All other files set to 644 (rw-r--r--).)

/cgi-bin/links/admin/backup/

Backups of files will be stored in this directory.

(Directory should be set to 777 (drwxrwxrwx) or 766 (drwxrw-rw-) depending on your server's preferred permission settings.)

/cgi-bin/links/admin/data/

* categories.db
* categoryid.txt
* email.db
* links.db
* linksid.txt
* modified.db
* url.db
* validate.db

(All files should be set to 666 (rw-rw-rw-). The directory should be set to 777 (drwxrwxrwx) or 766 (drwxrw-rw-) depending on your server's preferred permission settings.)

/cgi-bin/links/admin/data/hits/

* index.count

(This directory should be set to 777 (drwxrwxrwx) or 766 (drwxrw-rw-).)

/cgi-bin/links/admin/data/rates/

* index.html

(This directory should be set to 777 (drwxrwxrwx) or 766 (drwxrw-rw-).)

/cgi-bin/links/admin/Html/

All the HTML protocol modules.

(Directory set to 755 (drwxr-xr-x). The files should be set to 644 (rw-r--r--).)

/cgi-bin/links/admin/LWP/

All the LWP module files.

(Directory set to 755 (drwxr-xr-x). The files should be set to 644 (rw-r--r--).)

/cgi-bin/links/admin/templates/

All the Template files.

(All files set to 666 (rw-rw-rw-).)

/links/pages/

* links.css
* background.gif

(All files set to 644 (rw-r--r--).)

Maybe that'll lend some clues.
Later,
Paul

http://www.fullmoonshining.com for Pearl Jam Fans
Quote Reply
Re: is there anyone who'll set this up for a fee?? In reply to
Your help is so appreciated :-)
the error logs have been requested and are on their way...
Thanks, I'll let you know
Alan

Quote Reply
Re: is there anyone who'll set this up for a fee?? In reply to
Cranepaul,

A very extensive permissions/file locations FAQ is in the Resource Center. Please refer users to existing threads whenever possible instead of posting lengthy replies.

Regards,


--Drew
Quote Reply
Re: is there anyone who'll set this up for a fee?? In reply to
Thanks, it looks like it has been there very long. It's great there is finally one there. Thanks for the info.
Paul

http://www.fullmoonshining.com for Pearl Jam Fans
Quote Reply
Re: is there anyone who'll set this up for a fee?? In reply to
Hello again
i now have the error logs and here is an extract. It seems to show a fairly positive identification of what is wrong - if one knows how to fix it that is ;-)

here's what it says;

[Thu Jul 13 23:45:27 2000] [error] [client 62.7.23.249] Premature end of script headers: /www/vhtdocs/thomaau/eurodead/cgi-bin/links/add.cgi
Missing right bracket at modify.cgi line 193, at end of line
syntax error at modify.cgi line 193, at EOF
Execution of modify.cgi aborted due to compilation errors.
[Thu Jul 13 23:47:12 2000] [error] [client 62.7.23.249] Premature end of script headers: /www/vhtdocs/thomaau/eurodead/cgi-bin/links/modify.cgi
failed to open log file
fopen: Permission denied
[Thu Jul 13 23:49:39 2000] [error] [client 62.7.23.249] Premature end of script headers: /www/vhtdocs/thomaau/eurodead/cgi-bin/links/search.cgi
Missing right bracket at add.cgi line 171, at end of line
syntax error at add.cgi line 171, at EOF
Execution of add.cgi aborted due to compilation errors.


Now, I have checked these missing right brackets and my files are exactly the same as the original, fresh files in the zip file i downloaded in the first place - so what's with that ?


here is an extract from my add.cgi file which supposedly contains the error:

sub send_email {
# --------------------------------------------------------
# Sends an email to the admin, letting him know that there is
# a new link waiting to be validated. No error checking as we don't
# want users to see the informative &cgierr output.

# Check to make sure that there is an admin email address defined.
$db_admin_email or &cgierr("Admin Email Address Not Defined in config file!");

my $to = $db_admin_email;
my $from = $in{$db_cols[$db_contact_email]};
my $subject = "Addition to Database: $in{'Title'}\n";
my $msg = qq|
The following link is awaiting validation:

Title: $in{'Title'}
URL: $in{'URL'}
Category: $in{'Category'}
Description: $in{'Description'}
Contact Name: $in{'Contact Name'}
Contact Email: $in{'Contact Email'}

Remote Host: $ENV{'REMOTE_HOST'}
Referer: $ENV{'HTTP_REFERER'}

To validate, please go to:
$db_script_url

Sincerely,

Links Manager.
|;

# Then mail it away!
require "$db_lib_path/Mailer.pm";
my $mailer = new Mailer ( { smtp => $db_smtp_server,
sendmail => $db_mail_path,
from => $from,
subject => $subject,
to => $to,
msg => $msg,
log => $db_mailer_log
} ) or return;
$mailer->send or return;



Premature end of script headers?
Somebody like to enlighten me on that one ?

I see there's a permission denied in the log too, though which file this relates to is unclear to me.

Thanks again for all your help on this - I am more optimistic now, that you kind and wise people can finally help me to get this marvelous thing working.
Alan

Quote Reply
Re: is there anyone who'll set this up for a fee?? In reply to
I don't know if you left this out of the post or if it's missing in the add.cgi, but after the last line: $mailer->send or return; There should be a }. You might also make sure your not using cute ftp to upload your files. Several people have reported problems with it not transferring in ascii mode right. Another possiblility, which we have already checked was the links.cfg. All of these could cause that error. Make sure a bracket isn't missing in the other programs. See what that does and will go from there.
Later,
Paul

http://www.fullmoonshining.com for Pearl Jam Fans
Quote Reply
Re: is there anyone who'll set this up for a fee?? In reply to
I don't believe it - it worked!!!!
i checked the original zip file i downloaded and the add.cgi etc in that do NOT have this final }
So it can't have been my error.
Very strange.

I just spent 15 mins or so testing it all. I can now add and modify and search OK.
BUT i still have a problem - it throws up a 500 error when i try to rate a site.

I have re-checked the syntax and permissions etc and can't find any obvious reason.
I feel like i've run a marathon here, so a few more yards ain't gonna hurt ;-)

Thanks
Alan