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

Problem with links.cfg/db.pl/admin.cgi

Quote Reply
Problem with links.cfg/db.pl/admin.cgi
Hello,
execuse me, my english is not so good, I come from germany.
I study this Thread with great Interest then I have exactly this problem:
Error including libraries: Can't locate cgi-bin/admin/links.cfg in @INC (@INC contains: /usr/lib/perl5/i386-linux/5.00404 /usr/lib/perl5 /usr/lib/perl5/site_perl/i386-linux /usr/lib/perl5/site_perl .) at admin.cgi line 26. Make sure they exist, permissions are set properly, and paths are set correctly.

In my admin.cgi-file I have write:
require "/cgi-bin/admin/links.cfg";

and in my links.cfg stand:

$db_script_path = "cgi-bin/admin";
$db_dir_url = "http://myDomain/cgi-bin/admin";
$db_cgi_url = "http://myDomain/cgi-bin/links";

$build_root_path = "/extra//link/pages";
$build_root_url = "http://myDomain/extra/link/pages";

$build_new_path = "$build_root_path/New";
$build_new_url = "$build_root_url/New";

$build_cool_path = "$build_root_path/Cool";
$build_cool_url = "$build_root_url/Cool";

$build_ratings_path = "$build_root_path/Ratings";
$build_ratings_url = "$build_root_url/Ratings";

and under:
$db_lib_path = "$db_script_path";

What's wrong? I'n not understand! Please, help me.

Bye
Ralf

------------------
Quote Reply
Re: Problem with links.cfg/db.pl/admin.cgi In reply to
You need to change the following:

Code:
$db_script_path = "cgi-bin/admin";

to the following:

Code:
$db_script_path = "/absolute/path/to/cgi-bin/admin";

Change /absolute/path/to/ to the absolute path in your server to the /cgi-bin/ directory.

You will have to do the same thing for the $build_root_path variable.

If you don't know your absolute path, then contact your hosting company for information on how to set-up custom cgi/perl scripts in your account, and also ask them for your complete ABSOLUTE PATH.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: Problem with links.cfg/db.pl/admin.cgi In reply to
That's right!!
Thank you very much!!

Bye
Ralf
Quote Reply
Re: Problem with links.cfg/db.pl/admin.cgi In reply to
You're welcome.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: Problem with links.cfg/db.pl/admin.cgi In reply to
Make sure that you have the $db_script_path in the links.cfg file defined to the complete ABSOLUTE path to your admin directory where your links.cfg file should be located.

This variable is used to define the $db_lib_path, which is referenced for requiring the db.pl file in the admin.cgi file.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: Problem with links.cfg/db.pl/admin.cgi In reply to
I have almost the identical problem but mine
says:
Error including libraries: Can't locate home/user/mydomain.com/cgi/search/admin/db.pl in @INC (@INC contains: /usr/lib/perl5/i386-linux/5.004 /usr/lib/perl5 /usr/local/lib/site_perl/i386-linux /usr/local/lib/site_perl .) at admin.cgi line 28.

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

I have gone back through the instructions but still won't work.
Quote Reply
Re: Problem with links.cfg/db.pl/admin.cgi In reply to
Yes I have it set to:
home/user/mydomain.com/cgi/search/admin

I reset all permissions and still get:
Error including libraries: Can't locate home/user/mydomain.com/cgi/search/admin/db.pl in @INC (@INC contains: /usr/lib/perl5/i386-linux/5.004 /usr/lib/perl5 /usr/local/lib/site_perl/i386-linux /usr/local/lib/site_perl .) at admin.cgi line 28.

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

Any clues?
Quote Reply
Re: Problem with links.cfg/db.pl/admin.cgi In reply to
Uh...Your require line for the links.cfg file should look like the following in the admin.cgi file:

Code:
require "/home/user/mydomain.com/cgi/search/admin/links.cfg";

Also, make sure that you have the db.pl, db_utils.pl, and the admin_html.pl in the /admin/ directory.

Regards,


------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums


[This message has been edited by AnthroRules (edited March 17, 2000).]
Quote Reply
Re: Problem with links.cfg/db.pl/admin.cgi In reply to
Ok I did as you said and this time the error is:
Error including libraries: Can't locate home/user/mydomain.com/search/cgi/admin/db.pl in @INC (@INC contains: /usr/lib/perl5/i386-linux/5.004 /usr/lib/perl5 /usr/local/lib/site_perl/i386-linux /usr/local/lib/site_perl .) at admin.cgi line 28.


Now I double checked and the db.pl, db_utils.pl, and the admin_html.pl are all
in the admin directory.

I am sorry I hate to be such trouble.
Quote Reply
Re: Problem with links.cfg/db.pl/admin.cgi In reply to
As I mentioned before, you do NOT have the full absolute path for both the $db_script_path and also the $build_root_path in the links.cfg file.

You need to have the full ABSOLUTE PATHS, like the following:

Code:
$db_script_path = "/home/user/mydomain.com/cgi/search/admin";

AND

Code:
$build_root_path = "/home/user/mydomain.com/extra/links/pages";

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums


[This message has been edited by AnthroRules (edited March 17, 2000).]
Quote Reply
Re: Problem with links.cfg/db.pl/admin.cgi In reply to
In other words, put a / before home/

--mark
Quote Reply
Re: Problem with links.cfg/db.pl/admin.cgi In reply to
Incidently, if you set up links.cfg correctly, you won't have to change the require path to links.cfg in the .cgi files.

Since December of 96 (I think that's when Links 1.0 beta came out) I've set up Links on EASILY 250 to 300 different servers (probably more) and have never once changed the require lines from the default. Smile Alex recommends changing it, in the notes, if you are having difficulties, but i've never found that to be a problem.

--mark
Quote Reply
Re: Problem with links.cfg/db.pl/admin.cgi In reply to
Of course, that is correct, Mark, if you use the default directory structure of LINKS, however, if you don't, you have to set the full path in the require line for links.cfg in the admin.cgi file. Also, in terms of sub-domain configurations...you need to use the complete absolute path.

And I give that advice to everyone to make double sure that the required libraries load for admin.cgi.

Wink

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: Problem with links.cfg/db.pl/admin.cgi In reply to
 
Quote:
Of course, that is correct, Mark, if you use the default directory structure of LINKS, however, if you don't, you have to set the full path in the require line for links.cfg in the admin.cgi file.

'Tis true enough. I don't belive in altering the defualt structure on installs I do Smile

Quote:
Also, in terms of sub-domain configurations...you need to use the complete absolute path.

Hmm, i've never run into that problem.

Smile

--mark
Quote Reply
Re: Problem with links.cfg/db.pl/admin.cgi In reply to
I have...and the fix is to use absolute paths in all required library code lines.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: Problem with links.cfg/db.pl/admin.cgi In reply to
This is from the links.cfg
_____________________________
# Paths and URL's to Important Stuff

# PATH and URL of Admin CGI directory. No Trailing Slash.
$db_script_path = "/home/usr/mydomain.com/search/cgi/admin";
$db_dir_url = "http://www.mydomain.com/search/cgi/admin";
______________________________________

This is from the admin.cfg:
require 5.001; # Make sure we have at least perl 5.001.
require "/home/user/mydomain.com/cgi/search/admin/links.cfg"; # Change this to full path to links.cfg if you have problems.
require "$db_lib_path/db.pl"; # Database Routines.
________________________________________
and withouth th full path:
require 5.001; # Make sure we have at least perl 5.001.
require "links.cfg"; # Change this to full path to links.cfg if you have problems.
require "$db_lib_path/db.pl"; # Database Routines.
require "$db_lib_path/db_utils.pl"; # Database Support utilities.
______________________________
I even tried putting the paths into the db_lib_path/absolutepath/db.pl"; and it still didn't work.
either way It still can't find the db.pl
file. It is there in the admin directory. ascii uploaded.

Thanks Mark for pointing out the missing slash.
Quote Reply
Re: Problem with links.cfg/db.pl/admin.cgi In reply to
 
Quote:
Thanks Mark for pointing out the missing slash.

Uh...I believe I had something to do with this as well...if you look at the codes I provided, I did use the forward slash before home and if you would've used the codes I provided, you would've seen that it works.

But, c'est la vive!

Wink

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: Problem with links.cfg/db.pl/admin.cgi In reply to
Yet the problem still exists. I am still getting the errors even with all the slashes
and paths.

Error including libraries: Can't locate /home/usr/mydomain.com/search/cgi/admin/db.pl in @INC (@INC contains: /usr/lib/perl5/i386-linux/5.004 /usr/lib/perl5 /usr/local/lib/site_perl/i386-linux /usr/local/lib/site_perl .) at admin.cgi line 28.

Quote Reply
Re: Problem with links.cfg/db.pl/admin.cgi In reply to
Change the following line:

Code:
require "links.cfg"; # Change this to full path to links.cfg if you have problems.

to the following:

Code:
require "./links.cfg"; # Change this to full path to links.cfg if you have problems.

If that doesn't work, then try what I have posted before in the Topic:

Code:
require "/home/user/mydomain.com/cgi/search/admin/links.cfg"; # Change this to full path to links.cfg if you have problems.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: Problem with links.cfg/db.pl/admin.cgi In reply to
when I set it to:
require "/home/usr/mydomain.com/search/cgi/admin/links.cfg"; # Change this to full path to links.cfg if you have problems.

It says it can't find thee Links.cfg
so I put the period infront of the slash as
you show:
require "./links.cfg"; # Change this to full path to links.cfg if you have problems.

This is the error I get:
Error including libraries: Can't locate /home/usr/mydomain.com/search/cgi/admin/db.pl in @INC (@INC contains: /usr/lib/perl5/i386-linux/5.004 /usr/lib/perl5 /usr/local/lib/site_perl/i386-linux /usr/local/lib/site_perl .) at admin.cgi line 28.

Make sure they exist, permissions are set properly, and paths are set correctly
Quote Reply
Re: Problem with links.cfg/db.pl/admin.cgi In reply to
Ok I switched my site structure around
and finally got this thing to work!

I just don't understand why it won't take
the way the site is structured, but at this
point I don't care. I got a framed screen
that says Administrative Menu...
Now lets see where I go from here.
Thanks
Quote Reply
Re: Problem with links.cfg/db.pl/admin.cgi In reply to
You're welcome.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums