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

Error finding library?

Quote Reply
Error finding library?
Hei

I have installed the scritp... But when I try to open the admin.cgi, I must download this file and this error message apperes

Error including libraries: Can't locate home/n/no/norskstf/public_html/links/admin/db.cgi in @INC (@INC contains: /home/p/pt/pt-home/public_html/norskstf/links/admin /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at /home/p/pt/pt-home/public_html/norskstf/links/admin/admin.cgi line 28.
Make sure they exist, permissions are set properly, and paths are set correctly.

I have upploaded the files with ascii and used correct chmod...

This is my systempath

# PATH and URL of Admin CGI directory. No Trailing Slash.
$db_script_path = "home/b/br/norskstf/public_html/links/admin";
$db_dir_url = "http://home.no.net/norskstf/links/admin";

# URL of User CGI directory. No Trailing Slash.
$db_cgi_url = "http://home.no.net/norskstf/links/";

# PATH and URL of Pages to be built. No Trailing Slash.
$build_root_path = "home/b/br/norskstf/public_html/links/pages";
$build_root_url = "http://home.no.net/norskstf/links/pages";

What can be wron`g?
Quote Reply
Re: [fistersn] Error finding library? In reply to
Note the missing / before "home". It should look something like;

$db_script_path = "/home/b/br/norskstf/public_html/links/admin";

Hope that helps Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Error finding library? In reply to
Thansk a lot... I got it work, for a time. But then I choosed to change title of the page in the links.cgf file... All just stop to work.. When I tried to accsess the admin.cgi file again, I must download it again..

I have deleated all of the files, and upploaded it again... but this strange error still is there..

Now my links system path is like

# PATH and URL of Admin CGI directory. No Trailing Slash.
$db_script_path = "/home/n/no/norskstf/public_html/links/admin";
$db_dir_url = "http://home.no.net/norskstf/links/admin";

# URL of User CGI directory. No Trailing Slash.
$db_cgi_url = "http://home.no.net/norskstf/links/";

# PATH and URL of Pages to be built. No Trailing Slash.
$build_root_path = "/home/n/no/norskstf/public_html/links/pages";
$build_root_url = "http://home.no.net/norskstf/links/pages";

And the error message is,.

Error including libraries: syntax error at /home/p/pt/pt-home/public_html/norskstf/links/admin/links.cfg line 140, near "# Your date format can be whatever you like, as lo"
(Might be a runaway multi-line ll string starting on line 136)
syntax error at /home/p/pt/pt-home/public_html/norskstf/links/admin/links.cfg line 167, near "}"
Compilation failed in require at /home/p/pt/pt-home/public_html/norskstf/links/admin/admin.cgi line 27.
Make sure they exist, permissions are set properly, and paths are set correctly.

What can be wrong now?
Quote Reply
Re: [fistersn] Error finding library? In reply to
Can you upload your whole links.cfg file? (remove any details you don't want to be shown publically). It sounds like something else has been deleted by accident. Either a whole line, or just a " or something.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Error finding library? In reply to
# -------------
# 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.01
#
# (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 = "/home/n/no/norskstf/public_html/links/admin";
$db_dir_url = "http://home.no.net/norskstf/links/admin";

# URL of User CGI directory. No Trailing Slash.
$db_cgi_url = "http://home.no.net/norskstf/links/";

# PATH and URL of Pages to be built. No Trailing Slash.
$build_root_path = "/home/n/no/norskstf/public_html/links/pages";
$build_root_url = "http://home.no.net/norskstf/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";
# 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 = ();
# 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 = ''; $db_smtp_server = '';

# Email address of the administrator. BE SURE TO SET!
$db_admin_email = '';
# 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 = '';
# 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.cgi, you can edit regular html pages
# encoded with special <%links_tags%>. It's not as flexible as site_html.cgi, 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 = 'Norske Studenters Hattrick Forbund's links page';
# 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"; # 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;
Quote Reply
Re: [fistersn] Error finding library? In reply to
Here is your problem;

Code:
$build_site_title = 'Norske Studenters Hattrick Forbund's links page';

You need to use something like;

Code:
$build_site_title = 'Norske Studenters Hattrick Forbund\'s links page';

or

Code:
$build_site_title = q|Norske Studenters Hattrick Forbund's links page|;

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Error finding library? In reply to
Thanks for incretibel fast respons.... Now it works again,,,


But one quistion?
How to I password protect my ADMIn directory?
Quote Reply
Re: [fistersn] Error finding library? In reply to
No problem :)

Quote:
But one quistion?
How to I password protect my ADMIn directory?

You could try one of my scripts (attached) called Ace Password. Upload it to your admin panel folder, CHMOD to 755, and run. The password is "password" by default. That should work :) (click on "Setup .htacces" once logged in).

I'm off for the night now. Good luck though :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [fistersn] Error finding library? In reply to
One more thing, remove the trailing slash...

# URL of User CGI directory. No Trailing Slash.
$db_cgi_url = "http://home.no.net/norskstf/links/";


Leonard
aka PerlFlunkie
Quote Reply
Re: [Andy] Error finding library? In reply to
I had installed the acepassword...But suddenly something terribel hapening..
None of the admin pages works anymore... I get this error message....
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, "e-mail" and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.

What can be wrong?
Quote Reply
Re: [fistersn] Error finding library? In reply to
Did you run the acepassword.cgi script? If so, then its probably down to you not setting the path correctly Tongue

Its not easy to fix once you have done this, especially if you don't know the path that you entered (the path your entered, is where the .htacces file will be made).

Best bet, first of all, is to go into your admin folder via FTP, and run the following commands;

DELE .htaccess <enter>
DELE .htpasswd <enter>

Then give it another go, and see if the admin panel loads ok.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [PerlFlunkie] Error finding library? In reply to
In Reply To:
One more thing, remove the trailing slash...

# URL of User CGI directory. No Trailing Slash.
$db_cgi_url = "http://home.no.net/norskstf/links/";

Well spotted Cool

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Error finding library? In reply to
Thats the problem I cant find the htaccess or the htpasswd ....
Quote Reply
Re: [fistersn] Error finding library? In reply to
It will be hidden (most FTP programs don't show them normally). It may be in your root of the site, i.e when you login, you may see public_html, cgi-bin, logs, etc. See if its there. Otherwise, you may need to talk to your host, to see if they can find which folder it was written too Frown

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Error finding library? In reply to
I also did a mistake to delete all my files...... Not the pages files... But all of the rest..
Must I now build the pages folder again....???