Questions tagged [cgi]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
85 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><...
0
votes
0answers
75 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 ...
0
votes
1answer
54 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::...
0
votes
0answers
6 views

python cgi file is inaccessible by apache2

I have setup a .conf file to allow the use of python cgi by adding <Directory "/home/main/code"> Options +ExecCGI AddHandler cgi-script .py </Directory> and I made the python ...
0
votes
1answer
252 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 ...
1
vote
1answer
87 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+...
1
vote
0answers
198 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/...
2
votes
1answer
312 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|...
0
votes
1answer
204 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(...
0
votes
1answer
524 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 ...
1
vote
1answer
358 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: ...
2
votes
0answers
286 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 ...
4
votes
1answer
803 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" ...
1
vote
1answer
781 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-...
1
vote
2answers
236 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 ...
0
votes
2answers
362 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 ...
1
vote
1answer
377 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 ...
0
votes
1answer
101 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 ...
1
vote
1answer
560 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 ...
3
votes
1answer
19k 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 ...
1
vote
1answer
563 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-...
0
votes
1answer
285 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><...
0
votes
1answer
360 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 ...
1
vote
3answers
2k 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" ...
0
votes
0answers
417 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 ...
2
votes
0answers
121 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 ...
1
vote
1answer
1k 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 ...
1
vote
1answer
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 ...
-4
votes
1answer
167 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 ...
1
vote
1answer
2k 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 ...
2
votes
0answers
8k 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 ...
0
votes
1answer
646 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 ...
2
votes
1answer
897 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 ...
2
votes
1answer
20k 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>" ...
3
votes
2answers
4k 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-...
2
votes
1answer
274 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 ...
-1
votes
2answers
15k 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 ...
1
vote
2answers
4k 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 ...
2
votes
1answer
2k 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 ...
2
votes
1answer
960 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:...
1
vote
1answer
552 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 ...