Solved

cgi script is displaying the script not the results

Posted on 2002-04-18
3
133 Views
Last Modified: 2013-12-25
Hi,

I'm a web-server newbie. I'm playing with a Linux box and have installed apache. I've got some perl scripts with a cgi extention and when I try to run them it shows the code in the browser window. I've put the code in a directory called perltest. The server doesn't have a cgi-bin directory yet. How do I get it to run the scripts?

Yours,

Stoke
0
Comment
Question by:Stoke
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
Peewee earned 50 total points
ID: 6950376
Stoke,
http://www.visca.com/clueless/ is an excellent beginners point for perl cgi stuff.

To summarise:
You will need to change the httpd.conf so that cgi processing is enabled in certain directories and that the server realsises that .pl or .cgi files are treated as cgi scripts.

It is a fairly simple process:

You should pay special attention to the following commands:

ScriptAlias
AddHandler

Finally make sure your path to perl is correct and the scripts have the correct permissions.

All of these problems are covered in detai at Lou's site.

regards
Peewee
0
 

Author Comment

by:Stoke
ID: 6950729
Thanks Peewee,

ScriptAlias showed me there was already a cgi-bin, but in a different directory. AddHandler was commented out.

I've moved the code to that directory and it's now working. Well done.
0
 
LVL 5

Expert Comment

by:Peewee
ID: 6950865
Stoke,
glad to be of help

regards Peewee
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

910 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now