Questions tagged [cgi]

1) The Common Gateway Interface is a standard defining how web server software can delegate web page generation to a stand-alone application or executable file. 2) Computer Generated Imagery

This tag is mostly used for the Common Gateway Interface (CGI), which is a standard (see RFC 3875: CGI Version 1.1) that defines how web server software can delegate the generation of web pages to a stand-alone application, an executable file. Such applications are known as CGI scripts; they can be written in any programming language, although scripting languages are often used.

Less commonly on Stack Overflow, CGI may also be used to tag questions regarding Computer Generated Imagery.

See also

5191 questions
19
votes
3 answers

How can I get the entire request body with CGI.pm?

I'm trying to write a Perl CGI script to handle XML-RPC requests, in which an XML document is sent as the body of an HTTP POST request. The CGI.pm module does a great job at extracting named params from an HTTP request, but I can't figure out how…
Ryan Tate
  • 1,553
  • 2
  • 14
  • 21
19
votes
7 answers

Apache (2) throws "No such file or directory: exec of '/usr/lib/cgi-bin/fst.cgi' failed"

I am working in Ubuntu 10.10 (Maverick Meerkat) and running my CGI script under Apache, but it is showing me the following error... [Sat errorNo such file or directory: exec of '/usr/lib/cgi-bin/fst.cgi' failed [Sat Oct 22 02:56:45 2011] [error]…
Manju
  • 191
  • 1
  • 1
  • 5
19
votes
16 answers

What are alternatives to SQL database storage for a web site?

An SQL database is overkill if your storage needs are small. When I was young and dumb, I used a text file and flock()ed it when I needed to access it. This doesn't scale, but I still feel that non-database solutions have been completely ignored in…
Steve Hanov
  • 11,316
  • 16
  • 62
  • 69
19
votes
2 answers

How can I best find out how django works internally?

so I have been playing around with django for a bit and I really do like this framework. However, I would like to understand better how it actually works 'under the covers'. Here is my current view of client-server-django world, which is very rough…
Paul
  • 7,836
  • 2
  • 41
  • 48
19
votes
5 answers

Is cgi (common gateway interface) dead?

Ok, let's put it in a more mildly: Is cgi (common gateway interface) legacy? yes? no? Under what circumstances would a project starting today (one that does noot have to interact with legacy systems or libraries) use cgi?
flybywire
  • 261,858
  • 191
  • 397
  • 503
18
votes
8 answers

When should I use Perl CGI instead of PHP (or vice versa)?

For hobby purposes, I have a shared space on a hosting server that is providing, as many of them are, both PHP and Perl CGI. I have read on several places that CGI scripts are obsolete now, I think mainly for performance issues (like Is PHP or…
Peter
  • 47,963
  • 46
  • 132
  • 181
18
votes
10 answers

Start background process/daemon from CGI script

I'm trying to launch a background process from a CGI scripts. Basically, when a form is submitted the CGI script will indicate to the user that his or her request is being processed, while the background script does the actual processing (because…
Mitch Lindgren
  • 2,120
  • 1
  • 18
  • 36
18
votes
4 answers

Setting up Ruby CGI in Apache

I want to use Ruby in Apache through CGI. I have the following in my configuration file: DocumentRoot /home/ceriak/ruby Options +ExecCGI AddHandler cgi-script .rb test.rb is a testfile placed…
Joó Ádám
  • 909
  • 1
  • 11
  • 22
17
votes
2 answers

Returning http status codes in Python CGI

Is it possible to send a status code other than 200 via a python cgi script (such as 301 redirect)
Ash
17
votes
4 answers

php-cgi not found in PhpStorm resulting in 502 bad gateway

I'm trying to run a simple php file with PhpStorm (v2017.3). It should output a var_dump, but I constantly encounter a 502 bad gateway error in my browser when running the script. I receive the following error in the PhpStorm: php-cgi not found:…
Robert Cooper
  • 2,160
  • 1
  • 9
  • 22
17
votes
2 answers

Python SimpleHTTPServer to receive files

I am using SimpleHTTPServer's do_POST method to receive file. The script is working fine if I upload the png file using curl but whenever I use python request library to upload file, File uploads but become corrupt. Here is the SimpleHTTPServer…
john
  • 2,324
  • 3
  • 20
  • 37
17
votes
5 answers

Project ideas to become good at C++

I want to get into C++ team at work. Their job is to write CGIs in C++ (mainly but not limited to). I know basic C++. Reading the list at C++ book guide question on SO, I've got three books from a friend (I actually had the first one). The C++…
user201788
17
votes
9 answers

Set REMOTE_ADDR to X-Forwarded-For in apache

In a situation where Apache is sitting behind a reverse proxy (such as Squid), the cgi environment variable REMOTE_ADDR gets the address of the proxy rather than the client. However, the proxy will set a header called X-Forwarded-For to contain the…
tylerl
  • 30,197
  • 13
  • 80
  • 113
17
votes
7 answers

Perl Apache : Perl script displayed as plain text

While configuring with apache and perl cgi scripts, don't know why index.cgi/index.pl are displayed as plain text instead of executing them. When I put http://localhost in browser it displays below code, instead of executing it. List item …
msinfo
  • 1,147
  • 6
  • 21
  • 39
16
votes
4 answers

Java CGI vs. Servlets

What are the main differences between CGI and Java servlets?
Jakub Mach
  • 1,109
  • 3
  • 10
  • 19