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

Installation Problem: Admin.cgi can't find the scripts!

Quote Reply
Installation Problem: Admin.cgi can't find the scripts!
Hi!
I am quitenew to the world of CGI and Perl. I am trying to install Links at my Virtual Ave account (imemily.virtualave.net), but I keep running into error messages! For example, when trying to run admin.cgi, I would get an error message saying that it could not find links.cgi, etc. I was able to solve the first few by changing the path names (by simply making the requirement "links.cgi"), and I arrived at the Links Administration page. When I try to click the links, however, I get the following error message.

********************************************************
CGI ERROR
==========================================
Error Message : fatal error: Can't locate /home/imemily/cgi-bin/links/admin/links.def in @INC (@INC contains: /usr/local/lib/perl5/i386-freebsd/5.00404 /usr/local/lib/perl5 /usr/local/lib/perl5/site_perl/i386-freebsd /usr/local/lib/perl5/site_perl .) at admin.cgi line 55.

Script Location : admin.cgi
Perl Version : 5.00404

Form Variables
-------------------------------------------
db : links
view_search : 1

Environment Variables
-------------------------------------------
DOCUMENT_ROOT : /home/imemily/public_html
GATEWAY_INTERFACE : CGI/1.1
HTTP_ACCEPT : image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
HTTP_ACCEPT_CHARSET : iso-8859-1,*,utf-8
HTTP_ACCEPT_LANGUAGE: en
HTTP_CONNECTION : Keep-Alive
HTTP_HOST : imemily.virtualave.net
HTTP_REFERER : http://imemily.virtualave.net/cgi-bin/links/admin/admin.cgi?display=navigation
HTTP_USER_AGENT : Mozilla/4.05 (Macintosh; I; PPC, Nav)
PATH : /usr/local/bin:/usr/bin:/bin
QUERY_STRING : db=links&view_search=1
REMOTE_ADDR : 152.174.89.166
REMOTE_HOST : 152.174.89.166
REMOTE_PORT : 1674
REQUEST_METHOD : GET
REQUEST_URI : /cgi-bin/links/admin/admin.cgi?db=links&view_search=1
SCRIPT_FILENAME : /u/imemily/cgi-bin/links/admin/admin.cgi
SCRIPT_NAME : /cgi-bin/links/admin/admin.cgi
SCRIPT_URI : http://imemily.virtualave.net/cgi-bin/links/admin/admin.cgi
SCRIPT_URL : /cgi-bin/links/admin/admin.cgi
SERVER_ADMIN : webmaster@virtualave.net
SERVER_NAME : imemily.virtualave.net
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.0
SERVER_SOFTWARE : Apache/1.2.6
************************************************************

How can I fix it? If you would like to see any of my scripts they are under the directory
http://imemily.virtualave.net/cgi-bin/links/admin/
or I can post whatever you need to see here. I would also appreciate any additional information about similar installation problems. Thanks!
Quote Reply
Re: Installation Problem: Admin.cgi can't find the scripts! In reply to
I just went to the URL you posted and there are zero files there. At least, none displayed in my browser. Was that the correct URL?

Please post the settings you have in links.cfg for $db_script_path and $build_root_path.

[This message has been edited by Bobsie (edited July 08, 1999).]
Quote Reply
Re: Installation Problem: Admin.cgi can't find the scripts! In reply to
Hi!
That's weird, at the directory level, the files don't appear to be there, but when I connect with my ftp, they are! How strage. But when I connect to
http://imemily.virtualave.net/cgi-bin/links/admin/admin.cgi
I get the same, good old error message, so I know it's there! :-)

Here are the things you asked for:
$db_script_path = "/home/imemily/cgi-bin/links/admin";

$build_root_path = "/home/imemily/adoption/pages";

Let me know if you need anything else!
*Emily*
Quote Reply
Re: Installation Problem: Admin.cgi can't find the scripts! In reply to
I just used this URL:

http://imemily.virtualave.net/cgi-bin/links/admin/links.cfg

This resulted in the loading of the links.cfg in the browser but there are no linefeeds at the end of each line. Did you upload your scripts as ASCII? In fact, everything in Links v2, except background.gif, should be uploaded as ASCII.
Quote Reply
Re: Installation Problem: Admin.cgi can't find the scripts! In reply to
Hi!
Thanks for helping me so far. Yes, I did upload everything as text files. I had noticed that there were no linefeeds in that document, and I have no idea why. When I open it in a word processor it shows the linefeeds perfectly. Is something wrong with the paths I used? I seem to be getting a lot of errors about not finding scripts.
*Emily
Quote Reply
Re: Installation Problem: Admin.cgi can't find the scripts! In reply to
Hi! Okay, here's what I've figured out. It's all related to the links.def file, but sometimes I can get farther than others. The following chunk of code is from somewhere in the line-50's of admin.cgi

# Load the database definition file and set the link url.
$in{'db'} ?
require "$db_lib_path/$in{'db'}.def" :
require "links.def";

If i set that last line "links.def" to "home/imemily/cgi-bin/admin/links.def" I get the error when trying to run admin.cgi. If I leave it at "links.def", then i can get to the main Admin. page, but get the same error message when I try to click any lines. I don't know what this information means, but I thought you might!
*Emily*
Quote Reply
Re: Installation Problem: Admin.cgi can't find the scripts! In reply to
Try reuploading your links.cfg file in ASCII again and see if the errors go away. The fact that it looks right in a word processor doesn't mean much because they are designed to make it look right. If saving using a word processor, make sure it can save it in ASCII or Text mode. Then ftp it to your server in ASCII, not binary mode. If the file was in ASCII mode, then it would display correctly in a browser.

As to the code you mentioned, I wouldn't fool with that.
Quote Reply
Re: Installation Problem: Admin.cgi can't find the scripts! In reply to
In fact, make sure your links.def file is saved as an ASCII text file from your word processor and reupload it in ASCII mode via ftp. Like the links.cfg file, it is not displaying correctly in my browser, which is telling me it is not a valid ASCII file.
Quote Reply
Re: Installation Problem: Admin.cgi can't find the scripts! In reply to
I checked to make sure that all my files were saved as plain text, and then reuploaded them as text, too. Didn't make a difference. Since I don't know what's wrong, I think I'll just try something else! Thanks for your help!
*Emily*
Quote Reply
Re: Installation Problem: Admin.cgi can't find the scripts! In reply to
I know this is late, but could the problem be in editing the CGI script in a word processor as she states a few posts up?

I don't know too much about this stuff, but I recall reading about that being a major no-no.

I use homesite or notepad to edit my scripts.

HTH

Pete