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

Full path is good but db.pl is here

Quote Reply
Full path is good but db.pl is here
Can't imagine where's the problem.
Before to post my question here, I've read a lot of similar problems on this forum but the answers are always concerning the full path.
For me, I get the same error message : "can't find /home/mylogin/www/cgi-bin/links/admin/db.pl in @INC (@INC contains: /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 .) at admin.cgi on line 28..."
(of course, my login is my real login).
So, I'm wondering what I've made wrong ?

Line 28 of "admin.cgi" file is :
require "$db_lib_path/db.pl"; # Database Routines.

Here's what's in my "links.cfg" file :
# PATH and URL of Admin CGI directory. No Trailing Slash.
$db_script_path = "/home/mylogin/www/cgi-bin/links/admin";
$db_dir_url = "http://www.sinoiseries.org/cgi-bin/links/admin";

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

# PATH and URL of Pages to be built. No Trailing Slash.
$build_root_path = "/home/mylogin/www/links/pages";
$build_root_url = "http://www.sinoiseries.org/links/pages";

"db.pl" file is in the "admin" folder =
(/cgi-bin/links/admin/db.pl)

I'm sure the full path is correct. I'm using it for others cgi/perl scripts. (you can verify here http://faq.ovh.fr/?do=showq&qid=67)

Is there anybody to help me see where I'm wrong ?

Thanks a lot.
Pascale.
Quote Reply
Re: [Pascale] Full path is good but db.pl is here In reply to
The paths look okay as far as I can tell.

Are you sure that the file permissions on db.pl are set to allow it to be read by the script? Perl scripts often run as other/world/nobody rather than as owner.

Obviously the directory permissions are okay or admin.cgi wouldn't run in the first place.
Quote Reply
Re: [wysardry] Full path is good but db.pl is here In reply to
Thanks for your answer Wysardry. Not sure about the permissions. Anyway, I've tried 666 and 777. Each time I've got the same error message and can't imagine why.
Quote Reply
Re: [Pascale] Full path is good but db.pl is here In reply to
Well, db.pl is the first file that admin.cgi tries to include that relies on the paths being set correctly (it doesn't use a path to include links.cfg).

It might be an idea to download and install Perldiver to check what your real paths are, just in case.
Quote Reply
Re: [wysardry] Full path was not so good In reply to
Well done Wysardry ! Many thanks. I didn't know this great perldivers. It's very useful to understand what's happening.
So, it was in fact the full path ;-) no comment.
Now, links.cfg works fine as below :
# PATH and URL of Admin CGI directory. No Trailing Slash.
$db_script_path = "/home/mylogin/cgi-bin/links/admin";
$db_dir_url = "http://www.sinoiseries.org/cgi-bin/links/admin";

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

# PATH and URL of Pages to be built. No Trailing Slash.
$build_root_path = "/home/mylogin/www/links/pages";
$build_root_url = "http://www.sinoiseries.org/links/pages";

As you can see, I've made a mistake with www directory. Once needed, the other not... of course !

One more time, many thanks for your help.