Solved

cgi script is displaying the script not the results

Posted on 2002-04-18
3
138 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
[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
  • 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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

752 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