LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-26-2012, 06:30 AM   #1
ragnk
LQ Newbie
 
Registered: Feb 2012
Posts: 1

Rep: Reputation: Disabled
running cgi script


Hi,
I'm trying to create a offline webpage, where I can collect user data from a form. But the cgi script is not getting executed, it just gets displayed in browser.

What could be the cause? I'm not trying to publish on webserver, just offline useage.

Last edited by ragnk; 02-26-2012 at 06:31 AM.
 
Old 02-26-2012, 08:58 AM   #2
thinknix
Member
 
Registered: Nov 2008
Distribution: Lots!
Posts: 178

Rep: Reputation: 58
If you have a webform that is posting to a CGI, the setup is the same whether the access is local or from the internet. First make sure your CGI script is executable
Code:
chmod a+x myfile.cgi
and that the directory it is in has the +ExecCGI attribute, then add a handler for your specific CGI file extension (assuming this is for Apache):

Code:
<Directory "/var/www/mysite">
        Options +ExecCGI
        AddHandler cgi-script .cgi
</Directory>
You can also use a ScriptAlias, you can find more info on this here: http://httpd.apache.org/docs/2.2/howto/cgi.html
 
  


Reply



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
Running my perl cgi script mykolg General 23 01-14-2011 08:51 AM
i get an error message running php script inside a cgi script. repolona Linux - Software 0 02-22-2007 09:10 PM
cgi script not running furqan_sindhu Programming 1 06-05-2006 08:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:21 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration