Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


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

Rep: Reputation: Disabled
running cgi script

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
Registered: Nov 2008
Location: Southern Quebec
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
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):

<Directory "/var/www/mysite">
        Options +ExecCGI
        AddHandler cgi-script .cgi
You can also use a ScriptAlias, you can find more info on this here:


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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:41 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