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
Solved

cgi script is displaying the script not the results

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Perl script to find new files and compress those new files 5 106
How can I do this in Pyhton? 12 131
Groovy:unable to resolve class error 2 196
Folder Permission Powershell 4 64
The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

789 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