LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 07-25-2003, 05:13 PM   #1
klintonray
Member
 
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 www.stlukesserviceleague.org 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, 08:45 PM   #2
coolman0stress
Member
 
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-25-2003, 11:45 PM   #3
klintonray
Member
 
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, 09:04 AM   #4
titanium_geek
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...

titanium_geek
 
Old 07-26-2003, 07:09 PM   #5
klintonray
Member
 
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 http://www.stlukesserviceleague.org/...volunteer.cgi. This worked even though there is no real folder named cgi-bin in /var/www/html/. That address (stlukesserviceleague.org/cgi-bin/) 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, 06:04 AM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
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
 
  


Reply


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 01: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 05:37 PM
Perl shell-out to script dunna work. Works on command line. Why? jlangelier Linux - Software 1 08-28-2004 02:00 AM
Converting a Windows Perl script to a Linux Perl script. rubbercash Programming 2 07-19-2004 10:22 AM
Including methods from a perl script into another perl script gene_gEnie Programming 3 01-31-2002 05:03 AM


All times are GMT -5. The time now is 01:18 PM.

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