Solved

cgi script is displaying the script not the results

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Building Windows 10 1 82
Scripted configuration of TightVNC with Start on boot 7 59
Redirecting an Outlook attachment to a specific folder? 3 48
exchange ,script 10 43
I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…

773 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