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
10
votes
2 answers

Why python-cgi fails on unicode?

If run this code in console - it works well (it is in Russian), but if run it like cgi on Apache2 server - it fails: : 'ascii' codec can't encode characters in position 8-9: ordinal not in range(128). The code…
scythargon
  • 3,363
  • 3
  • 32
  • 62
9
votes
2 answers

Python 3, is using sys.stdout.buffer.write() good style?

After I learned about reading unicode files in Python 3.0 web script, now it's time for me to learn using print() with unicode. I searched for writing unicode, for example this question explains that you can't write unicode characters to non-unicode…
ilya n.
  • 18,398
  • 15
  • 71
  • 89
9
votes
4 answers

Running Lua under nginx (writing a website with Lua)

As a learning exercise I've dedicated some time to picking up Lua by creating some basic apps. I've gotten it installed and running great on Natty/Ubuntu, however, I'm a bit lost as to how to get it to play nice with nginx. I've read a bit here…
Jonathan Coe
  • 1,485
  • 4
  • 18
  • 36
9
votes
1 answer

Determine if Python script is being executed locally or as CGI

Let's say I have a basic Python script, test.py: #!/usr/bin/python print "Content-type: text/html\n\n" print "Hello world!" How would one determine if the script is being executed locally, e.g.: python test.py Or being called via a…
Dustin Ingram
  • 20,502
  • 7
  • 59
  • 82
9
votes
2 answers

HttpPlatformHandler HTTP Error 502.3 - Bad Gateway

I am trying to run rails on IIS, I followed the steps mentioned here by Scott Hanselman. Here's some info that might help: Rails version: 5.1.4 Ruby version: 2.3.3 After I followed the setup steps, I countered this issue HTTP Error 502.3 - Bad…
Mahmoud Sayed
  • 668
  • 5
  • 18