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
16
votes
4 answers

How do I get CGI.pm to output HTML5 instead of XHTML 1.0?

I'm having some trouble getting CGI.pm to output to HTML5 instead of XHTML 1.0 or HTML 4.01. When I try "HTML5" or "HTML 5" as the -dtd argument in start_html() I get a document in HTML 4. I've also tried importing :HTML5, but that doesn't seem to…
CyberSkull
  • 796
  • 1
  • 7
  • 16
16
votes
2 answers

Can one upload files using Python SimpleHTTPServer or cgi?

I would like to have a simple web page on which user can upload files. What would be the simplest way to do it. I know how to start SimpleHTTPServer but I do not know how I can upload files using SimpleHTTPServer. I do not even know if it is…
Roman
  • 124,451
  • 167
  • 349
  • 456
16
votes
4 answers

CppCMS vs. C++ Server Pages vs. Wt

I know Wt is the most stable of them, but it's a bit uncomfortable to use. CppCMS sounds good but how stable is it? How secure is it? I have encountered C++ Server Pages as well but there's nothing about their security in there. Has anyone had some…
the_drow
  • 18,571
  • 25
  • 126
  • 193
15
votes
6 answers

Cannot run cgi, show plain text only (Ubuntu 13.10 Apache 2.4)

I just install Ubuntu 13.10 and I am trying to install Apache. But when I tried to run a perl file in cgi-bin, the browser showed only plain text. My default.conf of Apache is below: AddHandler cgi-script .cgi .pl ScriptAlias /cgi-bin/…
user3026793
  • 151
  • 1
  • 1
  • 3
14
votes
10 answers

C/C++ CGI on Embedded device, POST, GET, LOGIN?

I have here a small embedded device with uClinux. There is a Boa web-server, that supports CGI scripts. I need to make basic dynamic pages. Requirements GET method for navigation POST method for forms LOGIN for authentication I found this page…
Meloun
  • 13,601
  • 17
  • 64
  • 93
14
votes
1 answer

WebSocket and CGI/FastCGI/SCGI protocols

I'm looking for resources about interaction between client side web socket, web server and real application backend that works behind CGI, FastCGI or SCGI protocols. It seems that this is impossible at this point as: Request length is specifically…
Artyom
  • 31,019
  • 21
  • 127
  • 215
14
votes
5 answers

cgi.parse_multipart function throws TypeError in Python 3

I'm trying to make an exercise from Udacity's Full Stack Foundations course. I have the do_POST method inside my subclass from BaseHTTPRequestHandler, basically I want to get a post value named message submitted with a multipart form, this is the…
cvalentina
  • 163
  • 1
  • 2
  • 7
14
votes
2 answers

.py file showing code in browser instead of running

I'm trying to get started with Python but can't get my server setup up correctly for localhost(using Ampps). Python is running just fine through IDLE and command line, however, when I open up the file in the browser the code is displayed and not…
user1104854
  • 2,137
  • 12
  • 51
  • 74
13
votes
6 answers

How to hide "cgi-bin", ".py", etc from my URLs?

Brand new to web design, using python. Got Apache up and running, test python script working in cgi-bin directory. Get valid results when I type in the URL explicitly: ".../cgi-bin/showenv.py" But I don't want the URL to look that way. Here at…
user447688
13
votes
4 answers

CGI script downloads instead of running

I'm running apache2 server. CGIHTTPServer is running in directory /mnt/hgfs/wind/BTech_BTP/BTP/code/final_code/. I'm using the url http://localhost:8000/test/www/adder.html. I have three file in ../final_code/test/www directory. adder.html…
suri
  • 327
  • 1
  • 4
  • 14
13
votes
3 answers

What are the differences between mod_php and cgi php script?

What are the differences between mod_php and cgi php script? I mean, why it's better (is it?) to use mod_php instead simple php scripts, running them as CGIs? Thanks
Simone Margaritelli
  • 4,584
  • 10
  • 45
  • 70
13
votes
6 answers

Trouble running python script as cgi under apache (ubuntu 12)

Disclosure: I searched a lot, and I don't think my question (for my configuration) is answered here. For example run python script as cgi apache server doesn't answer it. So: I have a simplest script possible: #!/usr/bin/env python print…
bzdjamboo
  • 555
  • 3
  • 6
  • 15
13
votes
2 answers

How can I add internationalization to my Perl script?

I'm looking at introducing multi-lingual support to a mature CGI application written in Perl. I had originally considered rolling my own solution using a Perl hash (stored on disk) for translation files but then I came across a CPAN module which…
kierse
  • 373
  • 4
  • 10
13
votes
3 answers

Detecting the http request type (GET, HEAD, etc) from a python cgi

How can I find out the http request my python cgi received? I need different behaviors for HEAD and GET. Thanks!
cfischer
  • 24,452
  • 37
  • 131
  • 214