Questions tagged [cgi]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
64 views

What are Lynx CGI scripts?

In lynx.cfg, it contains: .h1 CGI scripts # These settings control Lynx's ability to execute various types of scripts. .h2 LOCAL_EXECUTION_LINKS_ALWAYS_ON .h2 LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE #...
Ignis Incendio's user avatar
0 votes
1 answer
74 views

lighttpd: ajax request prints the content of cgi script instead of running it

I am using lighttpd version 1.4.55 within an ARM environment. I created an HTML pages in which there is a button used to download some json data. This button trigger a submit form that calls a cgi ...
marco's user avatar
  • 1
0 votes
1 answer
427 views

Disable CGI script buffering for web browsers

I have a tiny CGI script written in Perl which prints numbers from 1 to 10 with 1 second interval: root@debian-s-1vcpu-1gb-fra1-01:~# cat /usr/lib/cgi-bin/test #!/usr/bin/perl use strict; local $|=1; ...
Martin's user avatar
  • 7,426
1 vote
2 answers
462 views

CGI (Commong Gateway Interface) program wont run from HTML page, getting "Forbidden" permission

I'm trying to run this example CGI program that is from this Wikipedia page https://en.wikipedia.org/wiki/Common_Gateway_Interface The HTML code is as follows, the file is named "add.html" &...
doomspacemarine's user avatar
0 votes
1 answer
354 views

CGI (Commong Gateway Interface) program example wont run from HTML page [duplicate]

I'm trying to run this example CGI program that is from this Wikipedia page https://en.wikipedia.org/wiki/Common_Gateway_Interface The HTML code is as follows, the file is named "add.html" &...
doomspacemarine's user avatar
1 vote
2 answers
783 views

Apache2 won't run cgi files based on shebang

I'm trying to use Python as the server-scripting language instead of PHP. I've configured localhost and php files run fine under it. If I create a file .../localhost/temp/test.cgi (making it ...
mike rodent's user avatar
  • 1,112
0 votes
1 answer
1k views

Curl command in bash CGI script not displaying the XML output [data not shown]

if I run this command in linux shell. curl=`curl --connect-timeout 4 -k -X POST -H "Content-type: text/xml" --data "<MyRequest><HeartBeat timestamp=\"1311157780201\"></HeartBeat><...
user2107349's user avatar
0 votes
1 answer
330 views

Why might a perl CGI script fail to connect to MySQL, when it works from console?

I'm migrating to new server hardware, which also means learning the idiosyncrasies of a new Linux distribution (Debian buster). I've got a Perl CGI script which when run from the console runs, but ...
Rowland Shaw's user avatar
0 votes
1 answer
202 views

Perl.cgi soap request HTTP ERROR 411

I'm trying to learn SoapUI, but when running the code below I'm getting HTTP ERROR 411 all files are in /var/www/html/ not sure what's the issue. #!/usr/bin/perl use SOAP::Transport::HTTP; SOAP::...
Driven's user avatar
  • 11
0 votes
1 answer
1k views

Print the output of an interactive command in a shell script

I am writing a CGI script to monitor the system state, so the information must be outputted to the terminal with echo or cat. The problem is, systat is an interactive command, so it doesn't print ...
nalzok's user avatar
  • 369
1 vote
1 answer
231 views

How to get php-cgi with phpbrew (PHP5.3.x)

I installed php-5.6.40 php-7.1.14 with phpbrew and I've got php-cgi binaries on these both version. I used this command for get php-cgi 5.6.40 phpbrew install 5.6.40 +default+fpm+mysql+sqlite+mb+...
dubis's user avatar
  • 1,450
1 vote
0 answers
799 views

How to execute a cgi pointed to by a symlink?

My website has several cgi's (executable binaries compiled from C source, in case that matters) that work fine when run from a browser as, e.g.,       http://mydomain.com/cgi-bin/...
John Forkosh's user avatar
2 votes
1 answer
364 views

Nginx version agnostic php-fpm configuration

When I create a new webapp conf in Nginx I use the following template: server { root /var/www/html/${domain}; server_name ${domain} www.${domain}; location ~* \.(jpg|jpeg|png|gif|ico|css|...
Arcticooling's user avatar
0 votes
1 answer
432 views

Perl CGI, using system() to launch ssh and pass sanitized variables

I'm looking for a way to have perl launch a program with variables taken from the previous webpage. Here's my horrible perl code: #!/usr/bin/perl -w use CGI qw(:standard); use CGI::Carp qw(...
stelicho's user avatar
0 votes
1 answer
722 views

Scipts cgi and suexec

I have a httpd server SuexecUserGroup netmet netmet DocumentRoot /home/netmet/html ServerName ServerAdmin ErrorLog /var/log/httpd/netmet.error TransferLog ...
klaypez's user avatar
  • 313
1 vote
1 answer
507 views

Unable to run a .py file in cgi-bin by using ajax call from my .php file

Hi guys:) I am using a Beagle Bone Black with Debian Wheezy to make a project. I have a small problem:I have my index.php in /var/www from there I call a python file called send_email.php using ajax: ...
Juan Jose Jaramillo's user avatar
2 votes
0 answers
462 views

Stream audio from bash cgi script

I have a bash script which I would like to call as cgi to stream audio. The script looks like this: #!/bin/bash echo "Content-type: audio/wav" echo "" rtl_fm -f 89.9M -M fm -s 170k -A std -l 0 -E ...
yglodt's user avatar
  • 283
4 votes
1 answer
1k views

CGI with Shell Script

I'm having trouble running a CGI example with Shell Script, I'm not able to access the directory created in the example I'm following "/tmp/shell". By accessing the address "http://localhost/shell" ...
Patterson's user avatar
  • 765
2 votes
1 answer
1k views

How to Configure CGI in Ubuntu?

I recently installed Apache2 on Ubuntu and I am trying to configure CGI. I added the following lines in apache2.conf file: ScriptAlias /cgi-bin/ /home/router/cgi-bin/ <Directory /home/router/cgi-...
user5499177's user avatar
1 vote
2 answers
421 views

Apache CGI Workflow

I am trying to understand the workflow for CGI. So for example, say I use a unix shell script with CGI, what will be the sequence of steps executed to run this script when a client sends a request to ...
Jake's user avatar
  • 1,323
0 votes
2 answers
460 views

Apache 2.4.10 page not displayed

I'm not a big expert in Apache and I facing with a particular problem. I have 2 server where in the first I run Debian 7.9 with Apache/2.2.22, in the other one I have Debian Apache/2.4.10. In both ...
Federi's user avatar
  • 963
1 vote
1 answer
520 views

CGI error while trying to retrieve from sqlite3

I am trying to build a very simple login page, which asks the user for his register_no, username and password. And when he presses the submit button. I am trying to check whether it is an existing ...
Tasdik Rahman's user avatar
0 votes
1 answer
114 views

Does Basic "hello world" run as CGI.?

My question is simple. I install apache on centos and create a file as index.html and just add the content of "hello world". Now, when I access my web it display the "hello world" quote. My question ...
krs4keshara's user avatar
1 vote
1 answer
702 views

Verbose output missing when executing a script as CGI

This is my shell script #!/bin/bash echo "Content-type: text/plain" echo "" sshpass -p $pass ssh -v -p $port -t -o StrictHostKeyChecking=no root@$ip "cd / && ls && exit" It can be ...
Oou's user avatar
  • 11
3 votes
1 answer
21k views

Configuring Apache 2.4 to permit CGI on Debian Jessie

I’m new to Sysadmin and Apache configuration. Trying to get AWStats running, but in troubleshooting have gotten to trying to run a simple Hello World (html output) script on port 8888 and have been ...
MikeiLL's user avatar
  • 247
1 vote
1 answer
812 views

chroot cannot find cgi file

I am unable to serve or execute a cgi file, and the cause seems to be that chroot is unable to find the cgi file when the permission is set to executable. $>ls -l /var/www/my/dir/test.cgi -rwxr-xr-...
hilcharge's user avatar
  • 359
0 votes
1 answer
349 views

How to pass parameters in a cgi-perl on Fedora 20?

I'm using Apache server on Fedora-20. I'm trying to run a perl-cgi program on my local server, but it's not working, I have attached my html and perl code. html program: <html> <head><...
Krithi.S's user avatar
1 vote
1 answer
618 views

lighttpd2 and php under fast-cgi returns 403 "Permission denied"

lighttpd2 is under development but it's faar enough to where i want to start using it. I've overcome the hurdle of installing it and getting vhost etc working. PHP 5.6.6 (cgi-fcgi) (built: Feb 20 ...
Torxed's user avatar
  • 3,587
0 votes
3 answers
3k views

Cannot run Perl code as CGI script

I am using Arch Linux with httpd web server and webpage works ok. I had to add "Reboot" button on webpage and now I want to run a Perl CGI script, reboot.cgi, which so far only contains "Hello world" ...
KernelPanic's user avatar
  • 1,216
0 votes
0 answers
475 views

How to grant sudo permission for a .py script on a apache folder?

I've exemplo.py in an folder /opt/lampp/htdocs/cgi-local/exemplo.py folder. The script creates a socket that needs super user permissions. My question was a little confusing? I need to access ...
daemon's user avatar
  • 63
2 votes
0 answers
165 views

Execute CGI scripts on custom OMAP4 board as root

I have a Ubuntu 12.04 Custom Board running Apache2. I have a web page which calls a CGI script which is responsible for starting and stopping ipsec service. I access the web page from another machine ...
Harsh Vardhan's user avatar
1 vote
1 answer
2k views

Shell script equivalent to PHP $_POST

For example and learning purposes, I have a webpage that uses POST method to submit a text field. I have a server running script (bash) that I want to display what the "Query_string" is. I'm not ...
swam's user avatar
  • 113
1 vote
1 answer
105 views

www server restart after upgrading bash regarding the shell shock bug?

If a webserver uses CGI with bash, does it calls bash every time when there is a request regarding CGI or does it caches (bash and related libraries) it when starting the webserver? Q: So is a ...
somelooser28533's user avatar
-4 votes
1 answer
237 views

Reboot shortcut

I need to haved a shortcut on my desktop to a URL which reboots my debian server and then says "reboot successfull" in the browser, if that was the case. I do not want a putty reboot shortcut or ...
tamani's user avatar
  • 121
1 vote
1 answer
3k views

How to ensure a bash script is executable via web without being in /cgi-bin directory?

My document root is /0/ i do not have any cgi-bin directories. this is my virtual host with apache: Listen *:80 DirectoryIndex 1 <VirtualHost *:80> DocumentRoot /0 ServerName domain.tld ...
user82418's user avatar
2 votes
0 answers
9k views

Apache install on Debian: configuring CGI [closed]

I installed CGI via the package manager and enabled the mod, but two hours later I still cant get it to work. My /etc/apache2/sites-available/default is: <VirtualHost *:80> ServerAdmin ...
CGIHelppleaseplease's user avatar
0 votes
1 answer
771 views

Automatic login for mysql used in CGI script

I have written a CGI script using bash which executes a MySQL query. For MySQL authentication , automatic login is used by supplying the credentials in .my.cnf file as shown below . # the following ...
Zama Ques's user avatar
  • 3,256
2 votes
1 answer
1k views

redirection failing for CGI program

I'm trying to redirect the contents of command output to a file in a CGI program. The issue for me is that the output file is not getting created. The CGI Code snippet is as follows: #!/bin/bash ...
Zama Ques's user avatar
  • 3,256
3 votes
1 answer
22k views

500:Internal Server Error from CGI program

I am trying to write a CGI Program which is invoked from a HTML page . The CGI code snippet is as follows: #!/bin/bash echo "Content-type: text/html" echo "<html>" echo "<body>" ...
Zama Ques's user avatar
  • 3,256
3 votes
2 answers
6k views

Unable to launch the requested CGI program: /www/cgi-bin/first.cgi: Text file busy

I'm trying to make a very simple shell script to run as a CGI on a uhttpd server running on an OpenWRT install. The file is called /www/cgi-bin/first.cgi and looks like... #!/bin/sh echo "Content-...
bigjosh's user avatar
  • 599
2 votes
1 answer
333 views

GoAccess won't redirect its output as a CGI script

I've been pulling my hair with this script: #!/bin/bash echo Content-type: text/html echo "" goaccess -f /var/www/log/access.log -a | tee Which runs perfectly on the command line (generates HTML ...
Martin Naskovski's user avatar
-1 votes
2 answers
16k views

how to run perl cgi script on apache [closed]

I Successfully installed Apache web server in my local machine. My question is how to run perl cgi script on this server Actully I don't have any Idea that's why posted question here. my sample cgi ...
user3021349's user avatar
  • 16.2k
2 votes
2 answers
5k views

Configuring Apache 2.4 for CGI on FreeBSD

I am trying to run CGI on FreeBSD 9.2. I installed Apache 2.4 (pkg install apache24) Configured it to load CGI module. Also, I did chmod a+x on files in cgi-bin directory. And when I connect to ...
Eonil's user avatar
  • 4,627
2 votes
1 answer
3k views

How to enable CGI in OpenBSD?

I installed an OpenBSD 5.3 in Virtualbox. Webserver is apache: httpd_flags="" in rc.conf. httpd.conf # cat /var/www/conf/httpd.conf ...
gasko peter's user avatar
  • 5,464
2 votes
1 answer
1k views

How to give variable to a KSH script with a CGI?

index.sh is in the cgi-bin directory: #!/usr/bin/ksh echo 'Content-type: text/html <html><body> <form action=FOO.KSH method=POST> <input type=submit value=fgrep style=width:...
gasko peter's user avatar
  • 5,464
1 vote
1 answer
628 views

Why wouldn't Perl CGI script run

I'm using Apache on CentOS and am trying to run a Perl CGI script as directory index so it will run automatically as a subdomain. I added DirectoryIndex script.cgi and added a Directory stanza noting ...
mike's user avatar
  • 11