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

Error Message (but not 500)

Quote Reply
Error Message (but not 500)
When I tried to execute any CGI file, the following message came up. (this is for admin.cgi)

Error including libraries: Can't locate /htdocs/cgi-bin/links/admin/links.cfg in @INC (@INC contains: /usr/home/console/subdomains/rpghwy/htdocs/cgi-bin/links/admin /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 /usr/home/console/subdomains/rpghwy/htdocs/cgi-bin/links/admin/admin.cgi line 28.
Make sure they exist, permissions are set properly, and paths are set correctly.

I'm quite sure all my files are uploaded properly, what did I do wrong?

Quote Reply
Re: Error Message (but not 500) In reply to
Hi

Looks like a path has been set wrong somewhere. Try opening admin.cgi and set the full path to links.cfg. Open links.cfg and check your paths at the top of the file

Good Luck

DavyC

Quote Reply
Re: Error Message (but not 500) In reply to
I've tried that before, but no use... same results.

Quote Reply
Re: Error Message (but not 500) In reply to
Hi

I still think its your paths, they appear a little short at the start, there is usually more folders try the following script, change the first line to your perl path. FTP it to you admin directory, chmod to 777 and then call the script from your browser eg

http://www.yourdomain.com/links/cgi-bin/admin/scriptname.cgi

this will give you all the path names you need.

#!/usr/local/bin/perl

use strict;

print "Content-type: text/html\n\n";


my $directory=$ENV{'SCRIPT_FILENAME'};

my $dir=substr ($directory,0, -10);

my $root_dir=$ENV{'DOCUMENT_ROOT'};

my $base_dir=$ENV{'SCRIPT_NAME'};

my $base_dir=substr ($base_dir,0, -10);

print qq~<font face="verdana" color=blue><h3>FoyleNet Script Tools</h3>
<p><font face="verdana" size=2> This file will simply help you with the
directory paths on your server. Below are a few paths that may assist
you install your cgi scripts.</font></p>
<table width=95%><font size=2>
<tr>
<td><font face="verdana" size=2>
You are using perl version
</td>
<td><b><font face="verdana" size=2>
$] </b>
</td>
</tr>
<tr>
<td> <font face="verdana" size=2>
Full path to this directory
</td>
<td> <b><font face="verdana" size=2>
$dir </b>
</td>
</tr>
<tr>
<td> <font face="verdana" size=2>
The root directory
</td>
<td> <b><font face="verdana" size=2>
$root_dir </b>
</td>
</tr>
<tr>
<td> <font face="verdana" size=2>
The base path
</td>
<td> <b><font face="verdana" size=2>
$base_dir </b>
</td>
</tr>
</table>
<p><center><font face="verdana" size=1>
<a href="http://www.foylenet.com/scripts/">FoyleNet Scripts
</a></font></center>~;

Good Luck

DavyC

Quote Reply
Re: Error Message (but not 500) In reply to
It's still not working, but I think I know what did I do wrong, thanks for your help.