Solved

cgi script is displaying the script not the results

Posted on 2002-04-18
3
130 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

747 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

14 Experts available now in Live!

Get 1:1 Help Now