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

Help via ICQ???

Quote Reply
Help via ICQ???
Hi I am having trouble getting links to work..I have not worked with cgi scripts or perl up until now. I was wondering if anyone would be willing to walk me through the setup process via ICQ? It would be M U C H appreciated!!

ICQ:42259050

Bob Messinger
www.associate-trackers.com
Quote Reply
Re: Help via ICQ??? In reply to
I personally hate ICQ....So, if you want help from me, you will have to post the problems you are experiencing...although it would be best to first read the FAQs in the Resource Center and then search the Support Forums before posting questions or problems.

Regards,

Eliot Lee
Quote Reply
Re: Help via ICQ??? In reply to
I have uploaded all the files, I believe all the permissions are correct, or atleast as far as the readme stated. Hopefully there aren't more that I dont know about. Anyways when I try to access the admin.cgi I get this error.
Error including libraries: Can't locate /usr/home/www/bobm71/associate-trackers.com/cgi-bin/links/admin/links.cgf in @INC (@INC contains: /usr/libdata/perl/5.00503/mach /usr/libdata/perl/5.00503 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd /usr/local/lib/perl5/site_perl/5.005 .) at admin.cgi line 27.

Make sure they exist, permissions are set properly, and paths are set correctly.

I know it says it can't locate the links.cgf file, but I'm sure it's in the right place.

Here's my links.cfg file..
# -------------
# Links
# -------------
# Links Manager
#
# File: links.cfg
# Description: Contains all the setup variables.
# Author: Alex Krohn
# Email: alex@gossamer-threads.com
# Web: http://www.gossamer-threads.com/
# Version: 2.0
#
# (c) 1998 Gossamer Threads Inc.
#
# This script is not freeware! Please read the README for full details
# on registration and terms of use.
# =====================================================================

# Paths and URL's to Important Stuff
# --------------------------------------------------------
# PATH and URL of Admin CGI directory. No Trailing Slash.
$db_script_path = "/usr/home/www/bobm71/associate-trackers.com/cgi-bin/links/admin";
$db_dir_url = "http://associate-trackers.com/cgi-bin/links/admin";

# URL of User CGI directory. No Trailing Slash.
$db_cgi_url = "http://associate-trackers.com/cgi-bin";

# PATH and URL of Pages to be built. No Trailing Slash.
$build_root_path = "/usr/home/www/bobm71/associate-trackers.com/cgi-bin/links/pages";
$build_root_url = "http://associate-trackers.com/cgi-bin/links/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";

I also put this.. "/usr/home/www/bobm71/associate-trackers.com/cgi-bin/links/admin/links.cgf";
in the require field of the admin.gci where it said # Change this to full path to links.cfg if you have problems.

Hope you can help,


Bob Messinger
www.associate-trackers.com
Quote Reply
Re: Help via ICQ??? In reply to
The problem is with the first require line in your admin.cgi (as discussed several times in this forum)....you need to use the complete ABSOLUTE path to your links.cfg file in the admin.cgi file, like the followig:

Code:

require "/usr/home/www/bobm71/associate-trackers.com/cgi-bin/links/admin/links.cfg";


Look at the bolded codes...you have misspelled the links.cfg file.

Look at the Error message more carefully:

In Reply To:
Error including libraries: Can't locate /usr/home/www/bobm71/associate-trackers.com/cgi-bin/links/admin/links.cgf in @INC (@INC contains: /usr/libdata/perl/5.00503/mach /usr/libdata/perl/5.00503 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd /usr/local/lib/perl5/site_perl/5.005 .) at admin.cgi line 27.
Look at the bolded red codes.

Wink

Regards,

Eliot Lee
Quote Reply
Re: Help via ICQ??? In reply to
Eliot,

Thanks so much for your help. I have been working on this for about 3 days with horrible results. Thanks to you I am able to get to my admin.cgi now. I ran a test like it says in the readme..
i.e.
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.

1&2 worked fine, but when I tried 3(i'm assuming 3 means to "build all?") I got a cannot find server error. Is there something wrong with the nph-build.cgi?

Thanks again



Bob Messinger
www.associate-trackers.com
Quote Reply
Re: Help via ICQ??? In reply to
In Reply To:
1&2 worked fine, but when I tried 3(i'm assuming 3 means to "build all?") I got a cannot find server error. Is there something wrong with the nph-build.cgi?
Your server may not allow Non Parsed Header (NPH) files to be executed. So, what you need to do is go to the Resource Center (which is linked at the top of every forum page - Resources), and then go to the Links section, then go to the FAQ: Links 2.0 section and you will see three FAQs about Cobalt and NPH files...READ them and apply the codes. If the codes don't work, then search THIS forum via the Search form for nph build and you will find relevant Threads that address this problem!

Regards,

Eliot Lee
Quote Reply
Re: Help via ICQ??? In reply to
hmmm...well I tried it and it didn't work :( would you look over the following and see if I might have missed something?

I don't know if this helps, but the address to my admin is
http://associate-trackers.com/cgi-bin/links/admin/admin.cgi

nph-build.cgi....
#!usr/bin/perl
# -------------
# Links
# -------------
# Links Manager
#
# File: nph-build.cgi
# Description: Builds a set of HTML pages from the template directory. This is a
# non parsed header script, and should display the output directly as it may
# take quite a while to perform. It can also be called from the
# command line or via a cron routine. Read the README for more details.
# Author: Alex Krohn
# Email: alex@gossamer-threads.com
# Web: http://www.gossamer-threads.com/
# Version: 2.0
#
# (c) 1998 Gossamer Threads Inc.
#
# This script is not freeware! Please read the README for full details
# on registration and terms of use.
# =====================================================================


# Required Librariers
# --------------------------------------------------------
eval {
($0 =~ m,(.*)/[^/]+,) && unshift (@INC, "$1"); # Get the script location: UNIX /
($0 =~ m,(.*)\\[^\\]+,) && unshift (@INC, "$1"); # Get the script location: Windows \

require "links.cfg"; # Change this to full path to links.cfg if you have problems.
require "$db_lib_path/db_utils.pl";
require "$db_lib_path/links.def";
$build_use_templates ?
require "$db_lib_path/site_html_templates.pl" :
require "$db_lib_path/site_html.pl";
use vars qw(%category %subcategories @links @new_links @cool_links %stats $grand_total $use_html $nph $date $time);
};
if ($@) {
print "HTTP/1.0 200 OK\n";
print "Content-type: text/plain\n\n";
print "Error including libraries: $@\n";
print "Make sure they exist, permissions are set properly, and paths are set correctly.";
exit;
}
# ========================================================

eval { &main; }; # Trap any fatal errors so the program hopefully
if ($@) { &cgierr("fatal error: $@"); } # never produces that nasty 500 server error page.
exit; # There are only two exit calls in the script, here and in in &cgierr.

sub main {
# --------------------------------------------------------
#
$|++;

$use_html = 1;
$ENV{'REQUEST_METHOD'} and $use_html++;

$use_html and (%in = &parse_form);

# Either build the whole directory, parts of it, or just the new/popular section.
if ($use_html) {
if ($in{'staggered'}) { &build_staggered; }
else { &build_all; }
}
else { &build_all; }
}

sub build_staggered {
# --------------------------------------------------------
# Builds the directory in steps.
#
my %in = &parse_form;

# $nph ;
&html_print_headers() if ($use_html);
my %steps = ( 1 => 'Updating New and Popular Records and rebuilding URL database',
2 => 'Rebuilding Category Pages',
3 => 'Building Detailed View Pages',
4 => 'Updating Home/New/Cool Pages'
);
my $step = $in{'step'} || 1;
my $limit = $in{'limit'} || 20;
my $offset = $in{'offset'} || 0;
my $auto = $in{'auto'} || 0;
my $start = time();
my $date = &get_date;
my $time = &get_time;

my $header = qq~
<html>
<head>
<title>Rebuilding Directory -- Phase $phase</title>
~;

my $sub_head = qq~
</head>

<body bgcolor=#FFFFFF>
<H2><TT>Building Pages</TT></H2>
<P><em>Step: $steps{$step}</em>
<PRE>
Pages built on $date at $time
--------------------------------------------------------

~;
CASE: {

($step == 1) and do {
print $header;
print qq~<meta http-equiv="Refresh" content="2; URL=nph-build.cgi?staggered=1&step=2&auto=$auto">~ if ($auto);
print $sub_head;

my $t1 = time();
print "Backing up database . . .\n";
&build_backup;
print "Done (", time - $t1, " s)\n\n";

$t1 = time();
print "Building URL Index . . .\n";
&build_url_index;
print "Done (", time - $t1, " s)\n\n";

print "Updating New and Popular Records . . .\n";
$t1 = time();
&build_update_newpop;
print "Done (", time - $t1, " s)\n\n";

print "Updating ratings .. \n";
$t1 = time();
&build_update_ratings;
print "Done (", time - $t1, " s)\n\n";

my $elapsed = time() - $start;
print "------------------------------------------------\n";
print "Step 1 took $elapsed seconds.\n\n";
print qq~</PRE><P><B><font face="Verdana" size=2><a href="nph-build.cgi?staggered=1&step=2&auto=$auto">On to Step 2</A></B></FONT></P>~;
last CASE;
};

($step == 2) and do {
my @category_list = &category_list; my $i;
print $header;
if ($auto) {
($offset > $#category_list) ?
(print qq~<meta http-equiv="Refresh" content="0; URL=nph-build.cgi?staggered=1&step=3&auto=$auto">~) :
(print qq~<meta http-equiv="Refresh" content="2; URL=nph-build.cgi?staggered=1&step=2&limit=$limit&offset=~, $offset + $limit, qq~&auto=$auto">~);
}
print $sub_head;

print "Rebuilding Categories $offset -> ", $offset + $limit - 1, ".\n\n";
for ($i = $offset; $i <= $offset + $limit -1; $i++) {
last unless ($category_list[$i] =~ /\w+/);
%category = ();
%subcategories = ();
@links = ();
@new_links = ();
@cool_links = ();
%stats = ();
$grand_total = 0;
my $t1 = time();

print "** Building Category: $category_list[$i] ... \n";
&build_single_category ($category_list[$i]);
print "** Done (", time - $t1, " s)!\n\n";
}
$offset = $offset + $limit;

my $elapsed = time() - $start;
print "------------------------------------------------\n";
print "This phase of step 2 took $elapsed seconds.\n\n";
($offset > $#categories) ?
print qq~</PRE><P><B><font face="Verdana" size=2><a href="nph-build.cgi?staggered=1&step=3">Go on to Step 3!</A></B></FONT></P>~ :
print qq~</PRE><P><B><font face="Verdana" size=2><a href="nph-build.cgi?staggered=1&step=2&limit=$limit&offset=$offset&auto=$auto">Next $limit Categories!</A></B></FONT></P>~;
last CASE;
};

($step == 3) and do {
print $header;
print qq~<meta http-equiv="Refresh" content="2; URL=nph-build.cgi?staggered=1&step=4&auto=$auto">~ if ($auto);
print $sub_head;

if ($build_detailed) {
my $t1 = time();
print "Generating detailed view pages . . . \n";
&build_detailed_view;
print "** Done (", time - $t1, " s)!\n";
}
else {
print "Detailed Building is not turned on -- Skipping!\n\n";
}
my $elapsed = time() - $start;

print "------------------------------------------------\n";
print "Step 3 took $elapsed seconds.\n\n";
print qq~</PRE><P><B><font face="Verdana" size=2><a href="nph-build.cgi?staggered=1&step=4&auto=1">Go on to Step 4!</A></B></FONT></P>~;
last CASE;
};

($step == 4) and do {
print $header, $sub_head;

my $t1 = time();
print "** Loading Category information . . .\n";
&build_category_information;
print "** Done (", time - $t1, " s)!\n\n";

$t1 = time();
print "** Loading Summary information . . .\n";
&build_stats (1);
print "** Done (", time - $t1, " s)!\n\n";

$t1 = time();
print "** Creating Home Page . . .\n";
&build_home_page;
print "** Done (", time - $t1, " s)!\n\n";

$t1 = time();
print "** Creating What's New Pages . . .\n";
&build_new_page;
print "** Done (", time - $t1, " s)!\n\n";

$t1 = time();
print "** Creating What's Cool Page. . .\n";
&build_cool_page;
print "** Done (", time - $t1, " s)!\n\n";

$t1 = time();
print "** Creating Top Rated Page. . .\n";
&build_rate_page;
print "** Done (", time - $t1, " s)!\n\n";

my $elapsed = time() - $start;
print "------------------------------------------------\n";
print qq~Step 4 took $elapsed seconds.\n\n<b><a href="$build_root_url" target="_top">Your site</a> is now up to date!</b>~;
last CASE;
};

&cgierr("Unkown step: $step.");
};
}

sub build_all {
# --------------------------------------------------------
# Rebuild the entire directory.

# Determine if we are printing to command line, or to browser.
# $nph ;
&html_print_headers() if ($use_html);

my $start = time();
my $date = &get_date;
my $time = &get_time;

# Print HTML Header
$use_html ?
print qq|<html><head><tittle>Links Manager: Building Pages</title></head>
<BASE TARGET="_top">
<BODY BGCOLOR=#FFFFFF><H2><TT>Building Pages</TT></H2>
<PRE>| :
print qq|Building Pages\n|;
print "Pages built on " . $date . " at " . $time . "\n";
print "--------------------------------------------------------\n\n";
==============================================

nph-verify.cgi...
#!usr/bin/perl
# -------------
# Links
# -------------
# Links Manager
#
# File: build.pl
# Description: This routine validates the links. It checks to see that a return code of
# 200 is returned for each link and flags any errors. Return codes of 404 (File
# Not Found) should be updated. Return codes of 500, should be checked but might still
# be valid. It will store the results in a log file specified in the config file.
#
# NOTE: This routine requires the LWP module and NET::FTP available from
# CPAN: http://perl.com/CPAN/modules/by-module/LWP/
#
# Author: Alex Krohn
# Email: alex@gossamer-threads.com
# Web: http://www.gossamer-threads.com/
# Version: 2.0
#
# (c) 1998 Gossamer Threads Inc.
#
# This script is not freeware! Please read the README for full details
# on registration and terms of use.
# =====================================================================

BEGIN {
eval {
# print "HTTP/1.0 200 OK\n";
print "Content-type: text/html\n\n";

require 5.004;
require "links.cfg"; # Change this to full path to links.cfg if you have problems.
unshift @INC, $db_lib_path;
require "db_utils.pl";
require "links.def";
};
if ($@) { print "Error Loading System Libraries. Reason: $@"; die $@; }
}

========================================
nph-email.cgi...
#!usr/bin/perl
# -------------
# Links
# -------------
# Links Manager
#
# File: nph-mail.cgi
# Description: Massmails updates.
# Author: Alex Krohn
# Email: alex@gossamer-threads.com
# Web: http://www.gossamer-threads.com/
# Version: 2.0
#
# (c) 1998 Gossamer Threads Inc.
#
# This script is not freeware! Please read the README for full details
# on registration and terms of use.
# =====================================================================


# Required Librariers
# --------------------------------------------------------
BEGIN {
eval {
($0 =~ m,(.*)/[^/]+,) && unshift (@INC, "$1"); # Get the script location: UNIX /
($0 =~ m,(.*)\\[^\\]+,) && unshift (@INC, "$1"); # Get the script location: Windows \

require "links.cfg"; # Change this to full path to links.cfg if you have problems.
require "$db_lib_path/db_utils.pl";
require "$db_lib_path/links.def";
require "$db_lib_path/Mailer.pm";
};
if ($@) {
print "HTTP 1.0/200 OK\n";
print "Content-type: text/plain\n\n";
print "Error including libraries: $@\n";
print "Make sure they exist, permissions are set properly, and paths are set correctly.";
exit;
}
}

# ========================================================
eval { &main; }; # Trap any fatal errors so the program hopefully
$@ and &cgierr("Fatal error: $@"); # never produces that nasty 500 server error page.
exit;

sub main {
# --------------------------------------------------------
# $nph;

# Print full header.
my $use_html = 0;
$ENV{'REQUEST_METHOD'} and $use_html++;
$nph++;
&html_print_headers() if $use_html;

# Get form contents.
my (%in) = &parse_form() if $use_html;
my $start = time();

# Print a header.
$use_html and

Thank you,



Bob Messinger
www.associate-trackers.com
Quote Reply
Re: Help via ICQ??? In reply to
Try changing the following:

Code:

require "links.cfg";


to the following:

Code:

require "/usr/home/www/bobm71/associate-trackers.com/cgi-bin/links/admin/links.cfg";


Regards,

Eliot Lee
Quote Reply
Re: Help via ICQ??? In reply to
if it's not one thing it's another uugghh!! :-) I'm editing the cgi files in notepad. When I try to do what you said above notepad keeps telling me that there is not enough memory available. Can I open the nph-build.cgi in wordpad? If so what do I save it as. i.e. rich text, text..I tried to do it before and it puts a txt extention at the end i.e. nph-build.cgi.txt

thanx for the patients!

Bob Messinger
www.associate-trackers.com
Quote Reply
Re: Help via ICQ??? In reply to
Yes...Wordpad is the better program to use! (as mentioned a few times in these forums!).

Regards,

Eliot Lee
Quote Reply
Re: Help via ICQ??? In reply to
Wordpad is not a good choice either due to potential formatting problems. Give EditPad a try. http://www.jgsoft.com

Quote Reply
Re: Help via ICQ??? In reply to
Hi Tony,

Thanks for the heads up. I have decided to pay someone to install the scripts. I need to get my site up and running and I just don't have the time to learn this right now besides for $20 you can't go wrong. I'll grab that editpad though for the future.

Thanks again,

Bob Messinger
www.associate-trackers.com
Quote Reply
Re: Help via ICQ??? In reply to
I disagree...I use both WordPad and TextPad (http://www.textpad.com)...The former works great for me (for the past four years of coding) and the latter is great for larger files.

But to each his or her own...however, the main point of my posting was that Notepad is NOT a proficient editor for editing perl scripts and other scripts! Mad

Regards,

Eliot Lee