Questions tagged [cgi-bin]

cgi-bin is a special folder in web server's files and folder structure, designed to contains executable scripts written in CGI (Common Gateway Interface). These folders has often a specific properties, i.e. might be auto re-created once deleted or may be blocked from deletion.

258 questions
101
votes
4 answers

Should I delete the cgi-bin folder in a subdomain I just created?

Using cpanel on my hosting account, I created a subdomain - e.g. www.clothing.mysite.com A cgi-bin folder was automatically created in the directory for clothing.mysite.com. Do I need it? I'm only using the subdomain to install wordpress on it. I…
Margo
  • 1,013
  • 2
  • 7
  • 4
44
votes
1 answer

How do I run a Python script on my web server?

I've just started learning Python, and I'm pretty lost right now. I want to run my script on my server that is hosted through hosting24.com. Their FAQ says they support Python, but I have no clue where to put my script for it to run. There is a…
HellaMad
  • 5,294
  • 6
  • 31
  • 53
23
votes
2 answers

Python os module open file above current directory with relative path

The documentation for the OS module does not seem to have information about how to open a file that is not in a subdirectory or the current directory that the script is running in without a full path. My directory structure looks like…
Matt Phillips
  • 11,249
  • 10
  • 46
  • 71
12
votes
3 answers

How to retrieve form "POST" data via cgi-bin program written in C

I am trying to retrieve POST data from html form using program written in C. At the moment I am using: char *formdata = getenv("QUERY_STRING"); if(formdata == NULL) /* no data retrieved */ This seems to be working fine with form "GET" method but…
Athabaska Dick
  • 3,855
  • 3
  • 20
  • 22
7
votes
4 answers

Can't load 'C:/strawberry/perl/site/lib/auto/XML/LibXML/LibXML.dll' for module XML::LibXML

I have downloaded strawberry PERL and writing one application with CGI Perl Apache on Winxp sp3). One of the libraries (written by someone else) which I using uses XML::LibXML. When i load the page it gives Internal Server Error. From Apache error…
6
votes
3 answers

How to run a perl script in localhost?

I had already installed Apache. I am using PHP for my scripting in localhost. Need to know how to run the perl script. I have installed sudo aptitude install libapache2-mod-perl2 I have created a directory name cgi-bin in my /var/www/cgi-bin there…
Rahul
  • 364
  • 3
  • 8
  • 21
6
votes
2 answers

How do I remove "cgi-bin" from my URLs?

I'm creating a small application on an embedded device that has a boa web server running on it. I'm creating a web application in a mixture of plain HTML pages and Perl scripts to interface with the main application. Is there a way to hide the…
Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
6
votes
6 answers

Is a plain-text password in a CGI script a security hole?

I've read that things can go wrong with your web server which may lead to display of PHP scripts as plain text files in a web browser; consequently I've moved most of my PHP scripts to a directory outside the web root. Now I've been wondering…
canavanin
  • 2,559
  • 3
  • 25
  • 36
6
votes
2 answers

Executing Python Scripts with Lighttpd and CGI

I am having a problem getting python scripts to execute within Lighttpd and cgi-bin. I have found similar issues within stackoverflow (i.e. Lighttpd and cgi python) and other websites, but none fully pertain to my configuration. I can execute the…
user2909404
  • 61
  • 1
  • 1
  • 2
5
votes
4 answers

What were the main disadvantages of CGI-BIN based web development?

I was fortunate enough to not do any cgi-bin .cgi based web development. But generally those who have do not seem to 'miss' those days. A project I recently joined has a performance issue when dealing with the pages that need to communicate to a…
Brian
  • 13,412
  • 10
  • 56
  • 82
4
votes
1 answer

How to execute a script on a server from a webpage?

I want to run a shell script off my VPS through a website to start and stop a service. I have a script i currently execute by puttying in and typing ctf.sh. I had a look at using CGI and stuff, however this has left me thoroughly confused. On my VPS…
cheese510
  • 81
  • 1
  • 3
4
votes
1 answer

404 error while executing .py file in cgi-bin using apache2

previously i had error in installing apache2 for python, this is the link I thought i should continue there but right now i'm getting a new error so posting it as a new one this is what the problem is I have placed a file hello.py having…
Bhuvan raj
  • 413
  • 3
  • 8
  • 17
4
votes
1 answer

How to successfully run Perl script with setuid() when used as cgi-bin?

I have a Perl script that is called either via Apache or on the command-line. For testing purposes, I pass it the username I want the Perl script to operate with, and use POSIX::setuid to set the uid. If I run the script from the command line, then…
Alex Reynolds
  • 95,983
  • 54
  • 240
  • 345
4
votes
2 answers

Return an image to the browser in python, cgi-bin

I'm trying to set up a python script in cgi-bin that simply returns a header with content-type: image/png and returns the image. I've tried opening the image and returning it with print f.read() but that isn't working. EDIT: the code I'm trying to…
iboeno
  • 3,809
  • 4
  • 20
  • 13
4
votes
1 answer

LD_LIBRARY_PATH for Apache cgi script

I built a .CGI in C++. This binary depends on some boost shared library and other resources in a specific folder /usr/local/boost/. The CGI doesn't execute and in the log I can see the error error while loading shared libraries: libdxxx: cannot…
Abruzzo Forte e Gentile
  • 14,423
  • 28
  • 99
  • 173
1
2 3
17 18