Cgi is the common gateway interface, used for interactive webpages.
Questions tagged [cgi]
279 questions
1
vote
0 answers
Simultaneously enable gzip and $STR_REPLACE in CGI in apache
I have a code in my CGI script for text replacement (for example replace 'red' with 'blue')
$STR_SEARCH='red'
$STR_REPLACE='blue'
I am using the below code in .htaccess for enable replace function: (RequestHeader unset Accept-Encoding)
This work…

alex body
- 11
- 1
1
vote
1 answer
Nginx serving C++ cgi script: response is binary format
I am trying to run C++ CGI script on nginx. I am using FCGIWrap with script from nginx website. The program code is like this:
#include
using namespace std;
int main ()
{
cout << "Content-type:text/html\n\n";
cout << "\n";
…

Junchao Gu
- 111
- 2
1
vote
0 answers
Random newlines in CGI warnings written to the Apache error log
Since upgrading a server from Debian 7.8 to 8.2 (64-bit) the Apache upgrade (to 2.4.10) has introduced a very strange fault: random newlines in error_log.
Example:
[Mon Nov 16 13:29:54.388526 2015] [cgi:error] [pid 9122] [client xx.xx.xx.xx:1865]…

Daniel Beardsmore
- 166
- 5
1
vote
1 answer
mod_rewrite not working on web root dir
With the Apache/mod_rewrite config below i get a 403 forbidden error for any CGI scripts on the root /var/www/ I don't get any error for static files.
Scripts out of root dir i.e. /var/www/random/script.cgi work normally without errors.
With…

user3518089
- 11
- 2
1
vote
1 answer
uwsgi configuration with Nginx, with python scripts as cgi - 502 Bad Gateway
This is my .ini file to run the uwsgi "pyApp.py"
[uwsgi]
plugins = cgi
socket = 127.0.0.1:9010
cgi = /=/usr/share/test/
cgi-allowed-ext = .py
cgi-helper = .py=python
i have a file "firstapp.py" at location /usr/share/test/firstapp.py Its contents…

Archer
- 113
- 8
1
vote
0 answers
Possible that Apache start a script before AuthType is loaded?
I would like to run a script before the apache basic authentication is loaded.
Example: I type a url in my browser, get the basic authentication (Username Password) field, and at this point the script should be already executed.
Is something like…

fips123
- 361
- 1
- 5
- 17
1
vote
2 answers
hacking to my apache using cgi script
I newbie to web programming, so I setup an apache2 sever for my practice.
It seems that someone succeeded to hack my apache server.
I have notice in my access.log the following line:
81.169.174.52 - - [22/Jan/2015:17:24:39 +0200] "GET…

YyYo
- 113
- 1
- 4
1
vote
1 answer
Allowing a CGI-EXE app to access the registry
I have an exe app that I run on IIS (from C:\inetpub\wwwwroot in DefaultAppPool) and needs to access the registry, but it doesn't work, it seems like it doesn't have permission. What's weird is I ran it on Windows 8 and it works fine, but on Windows…

Dendory
- 333
- 1
- 4
- 13
1
vote
0 answers
Is my site getting hacked (Bluehost)?
I'm running a simple website off of Bluehost, and I needed to use custom Python scripts so I created a cgi-bin folder in my site's directory and added my cgi python files there. Everytime I tried to use an AJAX request to use the cgi scripts,…

Vishwa Iyer
- 111
- 2
1
vote
1 answer
CentOS 7 acl not working for apache
I want to access a user's directory from a cgi script. I set the acl on the directory successfully but the script still gets "Permission denied" when trying to access that directory. I su'd to apache and have the same problem (so it is not a…

Pascal
- 493
- 3
- 11
1
vote
2 answers
Need to determine how php files are being rendered in a LAMP configuration (CGI, FastCGI, or mod-php)
How do I determine how our php files are being rendered in a simple LAMP configuration?
phpinfo shows:
-- Configure Command --
--enable-force-cgi-redirect
--enable-fastcgi
-- Server API --
CGI/FastCGI
-- cgi-fcgi --
Directive Local…

Chris Williams
- 265
- 2
- 5
- 14
1
vote
0 answers
Does OPcache work when PHP is running in CGI mode?
Does PHP 5.5s OPcache work with PHP running in CGI mode?
Or does that even make sense, since it forks and kills PHP for each request?

gherkins
- 111
- 3
1
vote
0 answers
Apache Server 2.4 on EC2 "caught SIGTERM shutting down "
I'm using amazon linux on an m3.large instance on EC2.
I had these logs before my apache server was shut down:
[Sun Sep 28 18:54:31.679261 2014] [cgi:error] [pid 32422] [client 67.211.230.58:58937]
script not found or unable to stat:…

edam
- 111
- 1
- 3
1
vote
5 answers
You don’t have permission to access /index.py on this server
I am setting up a simple test page in Python. I only have two files: .htaccess and index.py. (Permissions for both set to 755) I get a 403 Forbidden error when trying to view the page - how can I fix this?
.htaccess:
RewriteEngine On
AddHandler…

Yongho
- 113
- 1
- 1
- 3
1
vote
2 answers
How can I run a cmd.exe cmd file as an apache for windows cgi
It sounds simple enough, but I'm having a hell of a time getting it to work.
Apache expects the first line of my script to say #!
And I don't want to use perl or anything else, I want to use c:\windows\system32\cmd.exe
But no…

Stu
- 2,198
- 2
- 16
- 23