ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.