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

Error including libraries: Can't locate /cgi-bin/Links/admin/db.pl in @INC

Quote Reply
Error including libraries: Can't locate /cgi-bin/Links/admin/db.pl in @INC
I'm a absolute newbie to cgi script setup.
It seems to me "Links" is a very good one.
Why do I get this error?
Don't Know if this is important:
I uploaded all *.cgi files in ascii mode
I chmoded all files correctly
I think I setup correctly the links.cfg
Could you help me?
Well... i should advise you that I'm a dummie in cgi. But that's watt we all are in the begining of something.
Thank's. Greeting from Portugal.

P.S.: Aditional Information:
I Get: Error including libraries: Can't locate /cgi-bin/Links/admin/db.pl in @INC (@INC contains: /data1/hypermart.net/ditevora/cgi-bin/Links/admin /usr/local/lib/perl5/i386-bsdos/5.00404 /usr/local/lib/perl5 /usr/local/lib/perl5/site_perl/i386-bsdos /usr/local/lib/perl5/site_perl .) at /data1/hypermart.net/ditevora/cgi-bin/Links/admin/admin.cgi line 28.
This What I get when I try to run .../admin.cgi as It says in the testing of the readme file.
I also Get BAD REQUEST when I try to add a Link
[This message has been edited by Jorge Barros (edited February 27, 1999).]

[This message has been edited by Jorge Barros (edited February 27, 1999).]
Quote Reply
Re: Error including libraries: Can't locate /cgi-bin/Links/admin/db.pl in @INC In reply to
I'm in the same position. I'm also "newbie" when it comes to CGI and Perl. I'm getting the same error as Jorge. You can see for yourself at http://whoopsearch.virtualave.net/cgi-bin/search.cgi. I think it's a problem with the paths, I'm not sure whether they are correct or not. Any help you could give me would be greatly appreciated.
Quote Reply
Re: Error including libraries: Can't locate /cgi-bin/Links/admin/db.pl in @INC In reply to
Jorge:

Quote:
Can't locate /cgi-bin/Links/admin/db.pl

Quote:
@INC contains: /data1/hypermart.net/ditevora/cgi-bin/Links/admin

Notice anything? The paths are different. They should be the same. Check your links.cfg paths. One of them is set wrong.

This is what you should have:

Quote:
$db_script_path = "/data1/hypermart.net/ditevora/cgi-bin/Links/admin";

However, watch out for the period (.) in the hypermart.net part of the path. It could cause you problems. See the FAQ (link at the top of this forum) for a solution for that.
Quote Reply
Re: Error including libraries: Can't locate /cgi-bin/Links/admin/db.pl in @INC In reply to
IT WORKED.
It was hard. Thhhhhaaaannkkk Youuuuu!
What a forward slash can do!

I Now Have access to the admin panel. Now I'm Learning...

BUT!!!
I think that the url that my visitors will come to is .../links.css - Is that correct?
If it is I get a Weird message asking me for the location of Hotmetal.exe "this file is needed to open SQ-HotMetaL Styles". I really don't Know what to do.

Hei Reggi! Did you solve your problem?
Thanks again Bobsie
Quote Reply
Re: Error including libraries: Can't locate /cgi-bin/Links/admin/db.pl in @INC In reply to
The following is part of my links.cfg. Maybe you can help me iron out some of my problems.

Code:
# PATH and URL of Admin CGI directory. No Trailing Slash.
$db_script_path = "/s5/reggie14/public_html/cgi-bin/admin";
$db_dir_url = "http://whoopsearch.virtualave.net/cgi-bin/admin";

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

# PATH and URL of Pages to be built. No Trailing Slash.
$build_root_path = "/s5/reggie14/public_html/pages";
$build_root_url = "http://whoopsearch.virtualave.net/pages";

thanks.
Quote Reply
Re: Error including libraries: Can't locate /cgi-bin/Links/admin/db.pl in @INC In reply to
Jorge,

No, links.css is not the default file your visitors will see. It should be whatever is defined in links.cfg in the variable, $build_index.

Reggie,

I can't see anything wrong with your path but, for certain, perl can't find your scripts in it. Double-check with your ISP to ensure you are specifying them correctly.
Quote Reply
Re: Error including libraries: Can't locate /cgi-bin/Links/admin/db.pl in @INC In reply to
Hey Bobsie! I feel I'm so close now...
I have several questions: Need some help
1. I did the testing in the read me file. First I got permission index.count permission denied and I Chmoded it to 666. Is that Ok?
2. I didn't Chmod all files in the templates directory. In the readme file says something about "if using the online editor" - What's that?
3. I now get this error when I try to build the pages:

Links Manager: Building Pages
Building Pages
Pages built on 28-Feb-1999 at 12:55:21
--------------------------------------------------------

Backing up database . . .
Backup exists for today.. Skipping
Done.

Building URL Index . . .
Done.

Updating New and Popular Records . . .
What's New Cutoff: 14 days
Popular Cutoff: 2 hits
Updating record: 3, marking as new.
Updating record: 4, marking as new.
Updating record: 5, marking as new.
Done.

Updating ratings ..
Done.

Loading Category Information . . .
Done.

Gathering Category and Link information . . .
Done

Building Home Pages . . .
Subcategories: 2
Total Links: 3
Opening page: /DIT/LINKS/index.html

CGI ERROR
==========================================
Error Message : unable to open home page: /DIT/LINKS/index.html. Reason: No such file or directory
Script Location : /data1/hypermart.net/ditevora/cgi-bin/Links/admin/nph-build.cgi
Perl Version : 5.00404

Form Variables
-------------------------------------------

Environment Variables
-------------------------------------------
DOCUMENT_ROOT : /data1/hypermart.net
GATEWAY_INTERFACE : CGI/1.1
HTTP_ACCEPT : image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, */*
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: pt
HTTP_CONNECTION : Keep-Alive
HTTP_HOST : ditevora.hypermart.net
HTTP_REFERER : http://ditevora.hypermart.net/cgi-bin/Links/admin/admin.cgi?display=navigation
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 4.0; Windows 95)
PATH : /bin:/usr/bin:/sbin:/usr/sbin
QUERY_STRING :
REMOTE_ADDR : 194.65.189.124
REMOTE_HOST : 194.65.189.124
REMOTE_PORT : 1472
REQUEST_METHOD : GET
REQUEST_URI : /cgi-bin/Links/admin/nph-build.cgi
SCRIPT_FILENAME : /data1/hypermart.net/ditevora/cgi-bin/Links/admin/nph-build.cgi
SCRIPT_NAME : /cgi-bin/Links/admin/nph-build.cgi
SCRIPT_URI : http://ditevora.hypermart.net/cgi-bin/Links/admin/nph-build.cgi
SCRIPT_URL : /cgi-bin/Links/admin/nph-build.cgi
SERVER_ADMIN : webmaster@hypermart.net
SERVER_NAME : ditevora.hypermart.net
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.1
SERVER_SOFTWARE : Apache/1.2.4 FrontPage/3.0.3

The Script seems unable to find the index.htm in my .../DIT/SCRIPTS/... directory. In fact I went there and there wasn't any index so I copyed the one in the backup directory. I chmoded it to 666. Please help.
Thank's again and again.
Jorge Barros
Portugal
Quote Reply
Re: Error including libraries: Can't locate /cgi-bin/Links/admin/db.pl in @INC In reply to
Jorge,

Can you post the following as recorded in your links.cfg?

$db_script_path
$db_dir_url
$db_cgi_url
$build_root_path
$build_root_url

Thanks
Quote Reply
Re: Error including libraries: Can't locate /cgi-bin/Links/admin/db.pl in @INC In reply to
Hello Bobsie
I'm So Sorry to anwser you so late but I think I wasn't notified of your reply so I tought the thread was closed. Thank's for your Kind attention.

This is a copy of my links.cfg

# Paths and URL's to Important Stuff
# --------------------------------------------------------
# PATH and URL of Admin CGI directory. No Trailing Slash.
$db_script_path = "/data1/hypermart.net/ditevora/cgi-bin/Links/admin";
$db_dir_url = "http://ditevora.hypermart.net/cgi-bin/Links/admin";

# URL of User CGI directory. No Trailing Slash.
$db_cgi_url = "http://ditevora.hypermart.net/cgi-bin/Links";

# PATH and URL of Pages to be built. No Trailing Slash.
$build_root_path = "/DIT/LINKS";
$build_root_url = "http://ditevora.hypermart.net/DIT/LINKS";

# 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";

Thanks again
Jorge Barros
Quote Reply
Re: Error including libraries: Can't locate /cgi-bin/Links/admin/db.pl in @INC In reply to
Jorge,

According to the error message, this is your document root directory:

Quote:
DOCUMENT_ROOT : /data1/hypermart.net

According to what you provided, you are using this as your document root directory:

Quote:
$build_root_path = "/DIT/LINKS";

I would think it should be:

Quote:
$build_root_path = "/data1/hypermart.net/DIT/LINKS";

Full paths need to be used. Try it and let me know if it works.