cgi

Why can't python find some modules when I'm running CGI scripts from the web?

I have no idea what could be the problem here: I have some modules from Biopython which I can import easily when using the interactive prompt or executing python scripts via the command-line. The problem is, when I try and import the same biopython modules in a web-executable cgi script, I get a "Import Error" : No module named B...

cgi with c programming

I'm trying simple example - #include <stdio.h> int main(void) { printf("Content-type: text/html\n\n"); printf("<html><title>Hello</title><body>\n"); printf("Goodbye Cruel World\n"); printf("</body></html>"); return 1; } compiled and moved to apache docroot - but when i click on url - it comes as a popup and asks where to down...

how to do client side sorting using querystring in hyperlink associated with the table header using Perl?

Hello everybody i hope everybody is doin well, Actually i have a table in which i fetch the data from sqlite database,i have done the paging and filtering for the grid using perl,now i need to do the sorting. The way in which i want to do is "MAKE THE TABLE HEADERS AS HYPERLINK AND WHENEVER I CLICK THEM THEN IT SHOULD SORT THE TABLE IN A...

Does apache guarantee that stdin will always have an EOF ?

AFAIK: A http POST request is sent to apache, then piped through stdin and into a CGI program. Does apache guarantee that the stdin stream will always have an EOF ? ...

is it possible to use openid on a CGI program

Is it possible to use openid to my site with CGI program. I'm thinking about using C as my language. If it's possible - please provide some url or examples. ...

cgi/gdform.cgi mail function

Hi I have a contact us page in htm and my form action is mydomain/cgi/gdform.cgi. I want to change my email(recipient mail id) id and the subject of the mail . But i don't how it is. Does any on know this. Please help me . ...

Sending mail to multiple recipients in cgi/gdform.cgi method

HI I have a gdform mail function. Here i want to send the mail body to multiple persons. is it possible to place a hidden field in within the form to place the email id of the recipient ...

how to run CGI script with parameters from console

Hi, I've wrote CGI script for www. This script expects two parameters through GET method, multiply these numbers and write result into the file. mult.cgi?m=1&n=2 But now I want to use this script from console too. I'tried something like ./mult.cgi?m=1&n=2 But it didnt work, how can I send parameters to script? thanks. ...

How to send textbox value to a CGI script

I have a textbox with id kTb. When I click the button after entering some value in the textbox, the below changeV(str) is called inside a javascript ('onClick="changeV(kTb.value)"'). The 'alert(str)' gives me the value I entered in the textbox but when I pass it 'urll = "uSetENV.cgi?kullaTest=str"', I am NOT getting the entered value, it...

How to parse the "request body" using python CGI?

I just need to write a simple python CGI script to parse the contents of a POST request containing JSON. This is only test code so that I can test a client application until the actual server is ready (written by someone else). I can read the cgi.FieldStorage() and dump the keys() but the request body containing the JSON is nowhere to ...

In what situation can CGI be faster than Servlet ?

I had an argument today with one of my teacher where he was saying CGI was always slower than Servlet. I told him that performance was subjective and in some situation CGI could perform better than Servlet. He insisted on getting example of when CGI could be faster than Servlet. I just want to know what would be the most solid thing I co...

python and matplotlib server side to generate .pdf documents

hi ! i would like to write a server side python script that generate .pdf documents. for the moment i have Python 2.7 installed server side and matplolib installed server side too. A simple script that create a simple plot and generate a .png picture works. this is the script i use : # to access standard output : import sys # selec...

How to pass query string parameters to the PHP binary?

I am developing a webserver that invokes the PHP binary (via CGI) to process a script. Here's the problem: The PHP script isn't picking up the command line parameters. For example, if the client requests path/to/file.php?test=value, the $_GET array is empty. I have tried passing the parameters in an environment variable (QUERY_STRING)...

Is it possible to run PHP and WCF on the same Azure instance?

I'm investigating the possibility of hosting a CMS (wordpress written in php) on Azure. I'm already running an ASP.NET Web Role which exposes WCF services. WordPress requires PHP. All my research suggests that I should create a new CGI Web Role to handle the PHP functionality. Is it possible to run the CGI Web Role and the ASP.NET We...

Silverlight, CGI, and the Debugger

I've got a Silverlight app that has to accept some initial data when it fires up. That data, unfortunately, MUST come from XML input. In addition, I can't just pass it through the URL because the actual request is coming from a server external to my own. So the basic setup is this: Remote server needs to launch my app. Remote server po...

Run native binary CGI on lighttpd

Hello, I'm trying to set up lighttpd to run binary CGI app (not PHP script or smth, but a binary file, compiled from C++ source). I actually have server.modules = ( ... "mod_cgi" ... ) uncommented, have myApp.exe in htdocs/app, and also cgi.assign = ( "myApp.exe" => "myApp.exe" ) Then, to make all the stuff work by accessing, say, ...

How can I handle web sessions with CGI::Session in Perl?

Im creating a web application in Perl using CGI. This application implements the Model View Controller architecture and the system has the following structure in the root directory: -models -views -controllers -index.pl The file index.pl only includes the respective views according to certain parameters that are sent to it (using funct...

Handle HTTP POST with PHP

Hello all, I struggled half a day and came to conclusion that it can't be done. I threw away my php scripts and rewrote it in perl and it worked right from the start the way I wanted it to work. Still, I want to find out if such trivial task can be done correctly in PHP. The question: I have arbitrarily long (in size and time) file uploa...

Python web programming with standard library

I want to write a simple python web application to provide a gui to a command line program (think of hg serve, for example). It would run locally only. I don't want it to have any external dependencies for an easier deployment, so python web programming in general wouldn't apply here How can it be done with a minimal hassle? Any pointe...

Why doesn't rrdtool generate any PNG output in my Perl CGI program?

I'm trying to output an image from RRD Tool using Perl. I've posted the relevant part of the CGI script below: sub graph { my $rrd_path = $co->param('rrd_path'); my $RRD_DIR = "../data/"; #generate a PNG from the RRD my $png_filename = "-"; # a '-' as the filename send the PNG to stdout my $rrd = "$RRD_DIR/$rrd_path"; my $png = `rrdto...