Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Perl script.. I think it might be permissions problem

Posted on 1998-05-17
7
Medium Priority
?
478 Views
Last Modified: 2013-12-25
I have invested a lot of time into trying to get this bbs set up on my system. I am allowed to run cgi scripts outside my cgi-bin, so I set this up to be in my domain at http://www.freehound.com/design/board/ I was told to change the name of the script to index.cgi and when I do (and adjust the script accordingly) I get an internal server error. When I run index.cgi from telnet I get the following error

heras:~/www/design/board$ index.cgi
Content-type: text/html

Error retrieving homepage source file! at /usr/local/bin/index.cgi line 18.

When I name the file config.pl and try to access it through my web browser it simply prints out the script in my browser, as if I opened it with a word processor. When I run config.pl from telnet it gives me the correct html to run the board.

I have set chmod 777 on the script. I can't figure this out, I have successfully set up several scripts on my page but this one has me stumped. I am pasting the config.pl script in here. If anyone can help me please... I could use it this time, I'm losing my hair over this one.

I know the paths are correct. The /home/www/freehound is the correct path to my site. Thank you in advance for any help you can offer me.

#!/usr/local/bin/perl

############################################
##                                        ##
##                 WebBBS                 ##
##           by Darryl Burgdorf           ##
##                                        ##
##           Configuration File           ##
##                                        ##
############################################

## (1) Define the location of your files:

require "/home/www/freehound/design/board/webbbs.pl";

$dir = "/home/www/freehound/design/board";
$cgiurl = "http://www.freehound.com/cgi-bin/config.pl";

## (2) Tailor the appearance and functionality of your BBS:

$bodyspec = "BGCOLOR=\"#ffffff\" TEXT=\"#000000\"";

$HeadLinesFile = "";
$HeaderFile = "/home/www/freehound/design/board/header.txt";
$FooterFile = "/home/www/freehound/design/board/footer.txt";

$MessageHeaderFile = "/home/www/freehound/design/board/footer.txt";
$MessageFooterFile = "/home/www/freehound/design/board/footer.txt";

$DefaultType = "";
$DefaultTime = "Month";

$boardname = "Web Design's Discussion Board";

$InputColumns = 80;
$InputRows = 15;

$HourOffset = 1;

$ArchiveOnly = 0;
$AllowHTML = 0;
$AutoQuote = 1;
$SingleLineBreaks = 0;

$UseCookies = 1;
require "/home/www/freehound/cgi-bin/cookie.lib";

$UseAdmin = 1;

$Max_Days = 30;
$Max_Messages = 500;

$ArchiveDir = "/home/www/freehound/design/board/archive";

## (3) Define your visitors' capabilities:

$AllowUserDeletion = 0;
$AllowEmailNotices = 1;
$AllowPreview = 1;

$AllowURLs = 0;
$AllowPics = 0;

$NaughtyWords = "";

## (4) Define your e-mail notification features:

$mailprog = '/bin/mail';
$maillist_address = "freeware\@freehound.com";
$email_list = 0;

$HeaderOnly = 1;
$AdminEmail = 1;

&WebBBS;

## (5) If necessary, set up the WebAdverts configuration subroutine

sub insertadvert {
require "/full/path/to/ads_display.pl";
$adverts_dir = "/full/path/to/ads";
$display_cgi = "http://foo.com/ads/ads.pl";
$advertzone = $_[0];
$ADVUseLocking = 1;
$ADVLogIP = 0;
$NonSSI = 0;
$DefaultBanner = "";
$ADVNoPrint = 1;
&ADVsetup;
}
 
0
Comment
Question by:timshank
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 5

Expert Comment

by:icd
ID: 1828662
First of all, you can't call the script xxxxx.pl since the only way that the Web Server 'knows' that it is a script is by the extension (.cgi). It is still possible to run a .pl file from a telnet session but within a browser all you see is the content.

The difference to home in on is that when the file is called config.pl and it is run from a telnet session, it works. When it is called config.cgi then it does not work.

The error you are getting,

Error retrieving homepage source file! at /usr/local/bin/index.cgi line 18.

is an odd one. Perhaps it is an internal program error rather than a server error. Try doing a search for the text 'retrieving homepage' in all the scripts included with this bbs package.

The line number should give a clue, but the output you gave has nothing on line 18 that could be responsible. I would have expected a 'require' or something on line 18. Check your original source code at line 18.

0
 
LVL 6

Expert Comment

by:alamo
ID: 1828663
You aren't actually executing your script! You are executing index.cgi from the path, from the directory /usr/local/bin.

To execute your script via telnet use:

heras:~/www/design/board$ ./index.cgi

That should give you the *real* error message, which you can use to figure out the problem. Good luck!
0
 

Author Comment

by:timshank
ID: 1828664
still get the same error message, although I got the board working I'm still curious about why the error message. Thanks
0
The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

 
LVL 2

Accepted Solution

by:
tpryor earned 80 total points
ID: 1828665
must have been a path problem if the only difference was the name that broke it. It is easy to miss one in another file that refers to config.pl
0
 

Author Comment

by:timshank
ID: 1828666
indeed it is. Thank you. lets scoot this question outta the way.
0
 
LVL 6

Expert Comment

by:alamo
ID: 1828667
sheesh.
0
 

Author Comment

by:timshank
ID: 1828668
sorry about that alamo, I guess that was kinda rude of me.
0

Featured Post

PowerShell Core for Advanced Linux Administrators

Understand advanced principals around Powershell Core with a focus on the Linux Administrator.  This course covers how to administer numerous environments across multiple platforms including Linux, Azure, AWS, and Google Cloud from a single shell instance.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
The viewer will learn how to count occurrences of each item in an array.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question