LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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, 07: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 07:31 AM.
 
Old 02-26-2012, 09:58 AM   #2
slugmax
Member
 
Registered: Nov 2008
Location: Northern CT
Distribution: Slackware, Debian, Ubuntu
Posts: 69

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


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


All times are GMT -5. The time now is 01:49 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration