cgi

CGI Buffering issue

I have a server side C based CGI code as: cgiFormFileSize("UPDATEFILE", &size); //UPDATEFILE = file being uploaded cgiFormFileName("UPDATEFILE", file_name, 1024); cgiFormFileContentType("UPDATEFILE", mime_type, 1024); buffer = malloc(sizeof(char) * size); if (cgiFormFileOpen("UPDATEFILE", &file) != cgiFormSuccess) { exit(1); } ou...

"#exec cgi" command is ignored from html; same script runs as a "form post" command

Apache configuration files all appear correct; I've added the ExecCGI to the RootDirectory, although this file resides in the ScriptAlias directory so that shouldn't even be necessary. I put a .htaccess file out there which is also probably not necessary. This is a simple counter.cgi file - runs fine from the linux command line; runs f...

Compile C# as CGI

How do you compile a C# program as CGI to run in the cgi-bin of a LAMP/Linux/Apache server? ...

Send a .png file using python cgi

Hi all, How can I send a .png file using python cgi to a flex application? Thanks in advance... ...

How to include Perl into shtml files

Hi I am trying to include a perl script within my shtml file. Unfortunately when I do my script doesnt seem to run but instead it just displays the content of the script. The code I am using is as follows: test.shtml: <html> <title> business home page </title> <body> </br> <!--#echo var="DATE_LOCAL" --> <br /> <!--#include virtual="h...

How exactly does an array get urlencoded?

Many languages allow one to pass an array of values through the url. I need to , for various reasons, directly construct the url by hand. How is an array of values urlencoded? ...

How do I resolve an error with an iframe?

I have a page on my site that uses an iframe to show a webcam picture from one of those ddns sites that facilitates web access to webcams. It works fine in all browsers, but in IE 8 (I haven't tried other versions of IE yet), I get that annoying little exclamation mark in the lower left corner of the browser, and when I open it up it sa...

cgicc query string parsing

I'm new to C++ and cgicc, and I want to know if there is an easy way to parse the get parameters to the cgi script? ?action=yes&function=no into an array or something like that? ...

Suppress PHP Headers running cgi PHP from Ruby

Admittedly, this is a strange problem for me to have, but here is what I'm doing: I've got a Ruby script that is executing a string of PHP code and capturing the output. This is somewhat related to another problem that I had with running cgi PHP from the command line. Here is the Ruby script's source: #!/usr/bin/ruby puts "Content-...

Is there any way to allow failed uploads to resume with a Perl CGI script?

The application is simple, an HTML form that posts to a Perl script. The problem is we sometimes have our customers upload very large files (gt 500mb) and their internet connections can be unreliable at times. Is there any way to resume a failed transfer like in WinSCP or is this something that can't be done without support for it in th...

Matplotlib and pylab doesn't work in python cgi

Hi all, Matplotlib and pylab doesn't work in python cgi. but it's working properly in python shell.. Any one can help me....... Plz....... Thanks in advance...... #!C:/Python26/python import cgi import cgitb import sys import os cgitb.enable() # set HOME environment variable to a directory the httpd server can write to os.environ[ 'H...

Linux system() command

I am running system("cmd") for n number of times in my cgi script This is read by Ajax on the client side. Out of n number of times there are some cases when the cmd couldn't be executed as file is not available. I want my system() call to work everytime and output something. What is happening now is that, it just prints the last value. ...

To run two CGIs simultaneously

On my form onbutton submit following events takes place: 1) CGI is called which uploads the file 2) Javascript/Ajax function is called which opens a request for another CGI and is supposed to receive updated values from there. However, it seems that the CGI with which Ajax is communicating is not responding to Ajax requests. My questi...

Is it possible to run SVN server on LAMP? (e.g. GoDaddy shared hosting account)

I have a shared-hosting account at GoDaddy, which includes LAMP (Linux, Apache HTTP Server, MySQL, and PHP). I really like SVN as my source control, and I thought "hey, maybe it's possible to have my own SVN server hosted in my GoDaddy account!" So, is it possible? Is there a "bridge" that enables SVN on LAMP? ...

How do I use google API within perl CGI script?

The google API example shows that you should have the javascript within the head tag but I am using perl module CGI and in there they suggest that you use "print header;" instead of writting out your headers explicitly. So if I want to use the perl CGI module and the google API javascript what is the correct way to do this? I tried w...

weird CGI error

I have a cgi script working on my localhost (ubuntu 10.04) just by dropping them to /usr/lib/cgi-bin but... in production (ubuntu 10.04) they never run: Apache error.log: [Sun Jun 13 13:13:58 2010] [error] (2)No such file or directory: exec of '/var/www/cgi-bin/tbk_bp_resultado.cgi' failed [Sun Jun 13 13:13:58 2010] [error] [client 19...

Understanding CGI and SQL security from the ground up

This question is for learning purposes. Suppose I am writing a simple SQL admin console using CGI and Python. At http://something.com/admin, this admin console should allow me to modify a SQL database (i.e., create and modify tables, and create and modify records) using an ordinary form. In the least secure case, anybody can access htt...

Perl & Apache HTTP server: Can't do Tie MLDBM when the cgi script is executed from the server, but okay when executed from the command line. Why?

Hi, please help! I'm really going nuts with this problem! I have a CGI perl script and it always fails at the following line when executed from the Apache HTTP server: tie %db, 'MLDBM', "$data_path/$db_name.db", O_RDONLY, 0640 or die $! and the error is Permission denied: Software error: Permission denied at /var/www/cgi-bi...

Clone request headers in Vanilla Perl CGI to LWP UserAgent

I have a perl CGI application that I want to take the users request headers, and turn those around into an LWP::UserAgent get request. Basically the goal is to replicate the incoming users headers and use those to make a separate request. I've tried to create the headers myself but when I attempt to display the CGI headers and then my ...

Where shall I start in making a scraper or a bot using python?

I'm not that new in programming languages(python) but I got no clue on where will I start in making a bot or a scrapper using python?. should I study in cgi programming? or does the scrapper runs just using a python script? Should I build a server for that? Got no clue for this... thanks for the help ...