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
1
vote
2 answers

Premature end of script headers (Perl)

#!C:\xampp\apache\bin\httpd.exe $command=`perl -v`; $title = "Perl Version"; print "Content-type: text/html\\n\\n"; print "$title"; print "

$title

\n"; print $command; print ""; I…
eozzy
  • 66,048
  • 104
  • 272
  • 428
1
vote
0 answers

How to write the output of a python cgi script to user-specified file

I have a client/server arrangement which allows the user to submit a data file (picked via a filebrowser) and run the python cgi script. This script writes the output to a file with a default hardcoded filename which the user then moves to wherever…
James
  • 11
  • 1
1
vote
1 answer

RRDTools RRDs::xport module's working example

I am trying to utilize the xport function of RRDs module in Perl to extract data from rrd files. However I am not having any luck finding a proper syntax to use the same. The official website only provides the following explanation. Please help if…
1
vote
0 answers

Print python output to CGI web page

I want to print the output of the NMAP scan to the webpage, however it does'nt display. I believe the webpage is not waiting till the bash command has finished before printing the output. How can I resolve this so that the output can be viewed on…
1
vote
0 answers

Output of Python command not outputting to web page (CGI)

The output of results from a netdiscover scan does not post to the webpage. I assume this is because the program doesn't wait until the bash command has finished executing before posting results using Python CGI. I have tried the .sleep function to…
1
vote
1 answer

Apache2 .cgi program fails to open file in /tmp (raspbian)

Edit: OK, I've made it much simpler. I put the file first.pl into /usr/lib/cgi-bin (typed, not copied, hope it's error free) #!/usr/bin/perl print "Content-type: text/html\n\n"; print "Hello, World."; my $file = "/tmp/first"; open(FILE,…
rich
  • 425
  • 3
  • 17
1
vote
3 answers

How can I run Python CGI scripts on my web server?

I want to run a Python CGI script on my web server (Apache 2.2). When I try to run the test.py file I get the following error: 403…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/python" class="post-tag grid--cell" title="show questions tagged 'python'" rel="tag">python</a> <a href="../../questions/tagged/apache" class="post-tag grid--cell" title="show questions tagged 'apache'" rel="tag">apache</a> <a href="../../questions/tagged/cgi" class="post-tag grid--cell" title="show questions tagged 'cgi'" rel="tag">cgi</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jul 07 '11 at 13:46">asked Jul 07 '11 at 13:46</time> <a href="../../users/833607/royal-pinto" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/833607.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Royal Pinto" /> </a> <div class="s-user-card--info"> <a href="../../users/833607/royal-pinto" class="s-user-card--link">Royal Pinto</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">2,869</li> <li class="s-award-bling s-award-bling__gold" title="8 gold badges">8</li> <li class="s-award-bling s-award-bling__silver" title="27 silver badges">27</li> <li class="s-award-bling s-award-bling__bronze" title="39 bronze badges">39</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-65991370"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/65991370/python-cgi-internal-error-login-html-login-cgi" class="question-hyperlink">Python CGI internal error login.html login.cgi</a></h3> <div class="excerpt">I'm currently trying to create a simple login in page to my actual local webpage that I'm running with on a virtual machine with Ubuntu. I created the LoginPage.html at the location /var/www/html. The HTML file then calls the login.cgi file in the…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/python" class="post-tag grid--cell" title="show questions tagged 'python'" rel="tag">python</a> <a href="../../questions/tagged/html" class="post-tag grid--cell" title="show questions tagged 'html'" rel="tag">html</a> <a href="../../questions/tagged/ubuntu" class="post-tag grid--cell" title="show questions tagged 'ubuntu'" rel="tag">ubuntu</a> <a href="../../questions/tagged/cgi" class="post-tag grid--cell" title="show questions tagged 'cgi'" rel="tag">cgi</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Feb 01 '21 at 10:52">asked Feb 01 '21 at 10:52</time> <a href="../../users/11943371/nidas" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/11943371.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Nidas" /> </a> <div class="s-user-card--info"> <a href="../../users/11943371/nidas" class="s-user-card--link">Nidas</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">13</li> <li class="s-award-bling s-award-bling__bronze" title="5 bronze badges">5</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-65976128"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/65976128/blender-eevee-render-not-working-properly" class="question-hyperlink">Blender Eevee render not working properly</a></h3> <div class="excerpt">So I am new to Blender (v 2.91) and I was trying out these render options i.e Eevee and Cycle. The Cycle (only CPU) option works fine for me but in the Eevee option, the cube/object appears black or sometimes disappears (As shown in the screenshot…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/rendering" class="post-tag grid--cell" title="show questions tagged 'rendering'" rel="tag">rendering</a> <a href="../../questions/tagged/cgi" class="post-tag grid--cell" title="show questions tagged 'cgi'" rel="tag">cgi</a> <a href="../../questions/tagged/render" class="post-tag grid--cell" title="show questions tagged 'render'" rel="tag">render</a> <a href="../../questions/tagged/blender" class="post-tag grid--cell" title="show questions tagged 'blender'" rel="tag">blender</a> <a href="../../questions/tagged/direct3d" class="post-tag grid--cell" title="show questions tagged 'direct3d'" rel="tag">direct3d</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jan 31 '21 at 05:43">asked Jan 31 '21 at 05:43</time> <a href="../../users/11126551/ishu" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/11126551.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Ishu" /> </a> <div class="s-user-card--info"> <a href="../../users/11126551/ishu" class="s-user-card--link">Ishu</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">11</li> <li class="s-award-bling s-award-bling__silver" title="1 silver badges">1</li> <li class="s-award-bling s-award-bling__bronze" title="3 bronze badges">3</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-6593248"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/6593248/issue-with-filename-containing-in-perl" class="question-hyperlink">Issue with filename containing "-" in PERL</a></h3> <div class="excerpt">I have created a file called "nph-select.pl" and put code for redirection as below. #!"D:\xampp\perl\bin\perl.exe" -w use CGI qw/:standard/; my $cgi = new CGI; print $cgi->redirect(-uri => 'http://www.google.com/', -nph => 1); and executing…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/perl" class="post-tag grid--cell" title="show questions tagged 'perl'" rel="tag">perl</a> <a href="../../questions/tagged/cgi" class="post-tag grid--cell" title="show questions tagged 'cgi'" rel="tag">cgi</a> <a href="../../questions/tagged/xampp" class="post-tag grid--cell" title="show questions tagged 'xampp'" rel="tag">xampp</a> <a href="../../questions/tagged/nph" class="post-tag grid--cell" title="show questions tagged 'nph'" rel="tag">nph</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jul 06 '11 at 08:00">asked Jul 06 '11 at 08:00</time> <a href="../../users/813571/rahul" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/813571.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Rahul" /> </a> <div class="s-user-card--info"> <a href="../../users/813571/rahul" class="s-user-card--link">Rahul</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">55</li> <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li> <li class="s-award-bling s-award-bling__silver" title="1 silver badge">1</li> <li class="s-award-bling s-award-bling__bronze" title="5 bronze badge">5</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-65894440"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/65894440/how-to-set-correct-file-permissions-with-cgi-session" class="question-hyperlink">How to set correct file permissions with CGI::Session</a></h3> <div class="excerpt">For anyone else reading this; it seems the issue was caused by permissions and suexec was part of the issue. Having disabled suexec, all is well again (subject to consequential issues I may find later). Two files I have in (say) dir1, in…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/perl" class="post-tag grid--cell" title="show questions tagged 'perl'" rel="tag">perl</a> <a href="../../questions/tagged/session" class="post-tag grid--cell" title="show questions tagged 'session'" rel="tag">session</a> <a href="../../questions/tagged/cgi" class="post-tag grid--cell" title="show questions tagged 'cgi'" rel="tag">cgi</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jan 26 '21 at 00:47">asked Jan 26 '21 at 00:47</time> <a href="../../users/14448956/jeronimo" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/14448956.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="jeronimo" /> </a> <div class="s-user-card--info"> <a href="../../users/14448956/jeronimo" class="s-user-card--link">jeronimo</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">43</li> <li class="s-award-bling s-award-bling__bronze" title="5 bronze badges">5</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-65840473"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status "> <strong>0</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/65840473/how-to-retrieve-php-session-in-perl-file" class="question-hyperlink">How to retrieve PHP session in Perl file?</a></h3> <div class="excerpt">I tried with CGI::Session and PHP::Session to retrieve PHP sessions in Perl but no luck still. Could you anyone help out me to resolve that task? using Core PHP for session. use CGI::Session; use PHP::Session; my $session = PHP::Session->new($sid, {…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/php" class="post-tag grid--cell" title="show questions tagged 'php'" rel="tag">php</a> <a href="../../questions/tagged/perl" class="post-tag grid--cell" title="show questions tagged 'perl'" rel="tag">perl</a> <a href="../../questions/tagged/session" class="post-tag grid--cell" title="show questions tagged 'session'" rel="tag">session</a> <a href="../../questions/tagged/cgi" class="post-tag grid--cell" title="show questions tagged 'cgi'" rel="tag">cgi</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jan 22 '21 at 06:44">asked Jan 22 '21 at 06:44</time> <a href="../../users/15044085/softuvo-test" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/15044085.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Softuvo Test" /> </a> <div class="s-user-card--info"> <a href="../../users/15044085/softuvo-test" class="s-user-card--link">Softuvo Test</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">45</li> <li class="s-award-bling s-award-bling__bronze" title="5 bronze badges">5</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-65830829"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/65830829/perl-cgi-script-can-not-read-a-directory-that-has-the-same-permission-as-its-p" class="question-hyperlink">Perl cgi script can not read a directory that has the same permission as its parent directory</a></h3> <div class="excerpt">I got a strange issue with our new Apache server. When my cgi script tries to read a directory, the system gives me permission denied: CGI Script: #!/usr/bin/perl print "Content-Type: Text/html\n\n"; # print `ls -altr / 2>&1`; print `ls -altr /opt…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/apache" class="post-tag grid--cell" title="show questions tagged 'apache'" rel="tag">apache</a> <a href="../../questions/tagged/perl" class="post-tag grid--cell" title="show questions tagged 'perl'" rel="tag">perl</a> <a href="../../questions/tagged/cgi" class="post-tag grid--cell" title="show questions tagged 'cgi'" rel="tag">cgi</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jan 21 '21 at 15:42">asked Jan 21 '21 at 15:42</time> <a href="../../users/4129989/eric-chang" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/4129989.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Eric Chang" /> </a> <div class="s-user-card--info"> <a href="../../users/4129989/eric-chang" class="s-user-card--link">Eric Chang</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">56</li> <li class="s-award-bling s-award-bling__bronze" title="3 bronze badges">3</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-65790443"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status "> <strong>0</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/65790443/script-not-found-or-unable-to-stat-in-cgi-bin-favicon-ico" class="question-hyperlink">script not found or unable to stat in /cgi-bin/favicon.ico</a></h3> <div class="excerpt">In my Apache 2.4 error log file I constantly get the following error: (takes up a huge amount of space in the Apache error log file) AH02811: script not found or unable to stat:…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/apache" class="post-tag grid--cell" title="show questions tagged 'apache'" rel="tag">apache</a> <a href="../../questions/tagged/perl" class="post-tag grid--cell" title="show questions tagged 'perl'" rel="tag">perl</a> <a href="../../questions/tagged/cgi" class="post-tag grid--cell" title="show questions tagged 'cgi'" rel="tag">cgi</a> <a href="../../questions/tagged/favicon" class="post-tag grid--cell" title="show questions tagged 'favicon'" rel="tag">favicon</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jan 19 '21 at 11:16">asked Jan 19 '21 at 11:16</time> <a href="../../users/2870624/gpwr" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/2870624.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="gpwr" /> </a> <div class="s-user-card--info"> <a href="../../users/2870624/gpwr" class="s-user-card--link">gpwr</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">988</li> <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li> <li class="s-award-bling s-award-bling__silver" title="10 silver badge">10</li> <li class="s-award-bling s-award-bling__bronze" title="21 bronze badge">21</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-6574325"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status answered-accepted"> <strong>2</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/6574325/dynamic-form-fields-not-sent-to-cgi-script" class="question-hyperlink">Dynamic Form fields not sent to CGI script</a></h3> <div class="excerpt">I am attempting to have a file upload page that allows for an arbitrary amount of file uploads. I found javascript code that successfully creates a new file input field in the form when one is clicked, however, any fields besides the one hardcoded…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/javascript" class="post-tag grid--cell" title="show questions tagged 'javascript'" rel="tag">javascript</a> <a href="../../questions/tagged/perl" class="post-tag grid--cell" title="show questions tagged 'perl'" rel="tag">perl</a> <a href="../../questions/tagged/forms" class="post-tag grid--cell" title="show questions tagged 'forms'" rel="tag">forms</a> <a href="../../questions/tagged/file-upload" class="post-tag grid--cell" title="show questions tagged 'file-upload'" rel="tag">file-upload</a> <a href="../../questions/tagged/cgi" class="post-tag grid--cell" title="show questions tagged 'cgi'" rel="tag">cgi</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jul 04 '11 at 17:11">asked Jul 04 '11 at 17:11</time> <a href="../../users/489160/ross-larson" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/489160.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Ross Larson" /> </a> <div class="s-user-card--info"> <a href="../../users/489160/ross-larson" class="s-user-card--link">Ross Larson</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">2,357</li> <li class="s-award-bling s-award-bling__gold" title="2 gold badges">2</li> <li class="s-award-bling s-award-bling__silver" title="27 silver badges">27</li> <li class="s-award-bling s-award-bling__bronze" title="38 bronze badges">38</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="s-pagination pager fr"> <a class="s-pagination--item" href="../../questions/tagged/cgi_page=96" rel="prev" title="Go to page 96">Prev </a> <a class="s-pagination--item" href="../../questions/tagged/cgi_page=1" rel="" title="Go to page 1">1</a> <a class="s-pagination--item" href="../../questions/tagged/cgi_page=2" rel="" title="Go to page 2">2</a> <a class="s-pagination--item" href="../../questions/tagged/cgi_page=3" rel="" title="Go to page 3">3</a> <div class="s-pagination--item s-pagination--item__clear">…</div> <a class="s-pagination--item" href="../../questions/tagged/cgi_page=99" rel="" title="Go to page 99">99</a> <a class="s-pagination--item" href="../../questions/tagged/cgi_page=100" rel="" title="Go to page 100">100</a> <a class="s-pagination--item" href="../../questions/tagged/cgi_page=98" rel="next" title="Go to page 98"> Next</a> </div> </div> </div> </div> </div> <script src="../../static/js/stack-icons.js"></script> <script src="../../static/js/fromnow.js"></script> </body> </html>