Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 07-25-2003, 06:13 PM   #1
Registered: Apr 2003
Location: Phx, AZ
Posts: 61

Rep: Reputation: 15
Angry Perl script for website won't work

Hey all, I am using red hat 9. I have put a web site up on the computer and have created a form for people to submit, but when they click the submit key it just displays the perl script. If you would like to see it for yourself, go to and click on student programs and then click on apply now. That will bring you to the form. Then when you click on submit, it will just show you the script without running it. Anyway, this is my first time ever creating script so what am I doing wrong? Thanx you guys always help a ton.
Old 07-25-2003, 09:45 PM   #2
Registered: Jun 2003
Location: Toronto, Ontario, Canada
Posts: 288

Rep: Reputation: 30
Your server might not be configured for cgi. Did you make sure to place your cgi files in the proper directory? Try to write another simple script and see if the same thing happens.
Old 07-26-2003, 12:45 AM   #3
Registered: Apr 2003
Location: Phx, AZ
Posts: 61

Original Poster
Rep: Reputation: 15
Hey all, I think I may have this one figured out. Thank you.
Old 07-26-2003, 10:04 AM   #4
Senior Member
Registered: May 2002
Location: Melbourne Australia
Distribution: it died/ macosx
Posts: 2,478

Rep: Reputation: 50
So, please tell, so that others might find the answer...

Old 07-26-2003, 08:09 PM   #5
Registered: Apr 2003
Location: Phx, AZ
Posts: 61

Original Poster
Rep: Reputation: 15
Sure, that is a good idea. Ok with red hat 9, apache is set up for it's default document folder to be in /var/www/html/ however the script folder is /var/www/cgi-bin/ so if one was to put a form in a folder like /var/www/html/application/ then in that html form they could not specify the action relative to the site or documents such as what i was trying to do in telling the html that my script was in ../../cgi-bin. I read up on this a bit and found out about folder aliasing which I had no idea about. Basically it is a way of pretending that an important folder (such as a scripts folder like cgi-bin) is already in /var/www/html/ when it really isn't) Anyway, the way I fixed this was to mark that folder (cgi-bin) to process the allow list before the deny list and the allow list was open to all. Then is the html form, I changed the action to point to an absolute url like This worked even though there is no real folder named cgi-bin in /var/www/html/. That address ( actually points to /var/www/cgi-bin/. I am sure i'm not the best at explaining this so if anyone has anyquestions just reply to this post as it send me an email when you do.
Old 07-27-2003, 07:04 AM   #6
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
The main difference is that the cgi-bin has the "ExecCGI" option set - this tells apache that it should execute scripts within that directory. This can be done for any folder by adding ExecCGI to the Options directive for that folder.

You may also be able to do this using .htaccess files but this again will depend on the AllowOveride directive within httpd.conf


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
A Perl script doesn't properly work Hirszu Programming 4 11-29-2005 02:02 AM
Problem with perl module for w3c validator to work on my local Apache+PHP+perl instal tbamt Linux - Software 0 12-16-2004 06:37 PM
Perl shell-out to script dunna work. Works on command line. Why? jlangelier Linux - Software 1 08-28-2004 03:00 AM
Converting a Windows Perl script to a Linux Perl script. rubbercash Programming 2 07-19-2004 11:22 AM
Including methods from a perl script into another perl script gene_gEnie Programming 3 01-31-2002 06:03 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:51 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration