cgi

Error in creating HTML form using Python-CGI

I have to create a HTML form and get the data using python-cgi. HTML form requires user to submit firstname and lastname and then the python script is supposed to get the data generated in the form. I have read up tutorials and tried playing with it to make it work, but it does not seem to happen. HTML code: <form method = "POST" actio...

Python CGI-based frameworks for web development and templates?

What are my choices for frameworks for doing Python web development and having a nice language for writing templates for CSS/HTML? A key goal for me is not to have to run a server or install many extra dependencies -- I'd like something that works just by using CGI and hopefully does not force me to do any fancy reconfiguration of Apach...

In perl how to distiniguish between CLI & CGI mode

Hi, I am suppose to write perl-CGI script, which supports CLI & CGI mode. And I am unable to find the way to distinguish between two mode. I am looking for the way to check for mode whether it is CLI or CGI ? So could you please let me know how to implement the logic? Thanks in advance. ...

Problem with cgi-bin python program putting output in wrong place

Hello all. I have a cgi python program which runs an os.system command and this command is printing output and causing havoc. How do I get python to run the os.system command and have that command print to the webpage it is being run on? ...

Can't run a Perl app

Although I can run test.cgi from the same location but app.cgi gives "Internal Server Error". I checked the permissions, chmoded 755 to everything. The app is located in domains root so the url will be domain.com/app.cgi This is the htaccess: AddHandler cgi-script .cgi Options +ExecCGI IndexIgnore * DirectoryIndex app.cgi RewriteEn...

How do I access HTTP request headers in HTTP::Server::Simple::CGI?

Hi! I'm using HTTP::Server::Simple::CGI for a light-weight HTTP server. That gives me a CGI object in a callback function when a HTTP request is accepted. How can I access the incoming HTTP headers, especially non-standard headers? The environment variables are only the standard ones. cgi->param gives me only the form parameters. Tha...

htaccess correct?

Although I can run test.cgi fine but my perl all doesn't work, is this htaccess correct: AddHandler cgi-script .cgi Options +ExecCGI IndexIgnore * DirectoryIndex myapp.cgi RewriteEngine on RewriteRule ^$ myapp.cgi [L] RewriteRule ^/$ myapp.cgi [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ...

CGI Proxy that can support ajax?

I'm looking for a cgi proxy that can support gmail, for example you can navigate to gmail.com. here is an instance of cgi proxy: http://www.browsesafely.co.uk/ ...

In Ruby, how do you print out the URL params and Server environment variables?

In Ruby (running on a web server as a .cgi), how do you print out the URL params and Server environment variables, preferable without using any package? (by the rawest form) ...

CGI Application Authentication using multiple drivers

Hi I have been trying to authenticate my CGI application through 2 drivers, one that uses username/password stored in the database and other using ldap active directory. following is the code $self->authen->config( DRIVER => [ 'DBI', DBH => $self->dbh, TABLE => 'user', CONSTRAINTS => { 'user.username' => '...

How to know if a cgi script is executing ?

I have added a cgi script in cgi-bin folder. Now... How can I know if this cgi script is executing ? ...

mod_perl handles inclusion paths differently than cgi?

I have a script that's written in perl, and executed as CGI. It works fine. Recently I have installed the mod_perl module into apache, and used the PerlModule ModPerl::Registry directive. PerlModule ModPerl::Registry PerlModule CGI PerlSendHeader On Alias /perl/ /real/path/to/perl/scripts/ <Location /perl> SetHandler perl-script Perl...

How to control (start / stop encoding) Flash Media Encoder using ActionScript 3 ?

How to control (start / stop encoding) Flash Media Encoder 3.5 using ActionScript 3 (using Flash CS4) ? UPDATE: Flash Media Server 3.5 is also installed in same server. It includes an Apache server, which I think can run batch script, if CGI is installed. Is it a solution? Seems dangerous. ...

Check length per file instead of entire request in CGI Upload

I am attempting to modify the Uber-Uploader perl script so that when an upload is checked if it meets the minimum requirements, it checks per file instead of just the entire request. I'm not too experienced with perl, and don't know how to do this. Currently the script simply does this: elsif($ENV{'CONTENT_LENGTH'} > $config{'max_uploa...

special Characters in Perl

I'm creating a CGI form to update a Sybase stored procedure. qq {execute procedure test(123,45,date,'$note');}; the $note variable is information obtained from a textbox that contains trouble ticket log information. As such people who enter such information can, and most likely will use special characters such as '|"{} etc. Im curious...

Deploying Django with no CGI available?

I need to deploy a Django project on a shared server which I have no root access for, and no administration capabilities whatsoever. Each user on the server has a dedicated directory from which Apache serves that users files (public URL would be /~username/). Problem is, Apache on this server has no CGI capabilities, no mod_python, no ...

preg replace in CGI, PL

I want to do preg replace in CGI. I have a string with URL like "www.example.com/data/example.cgi?name=example". I want to write a script which will replace "/data/example.cgi" from above url to "/example.php" ...

Perl CGI script returns different results depending on run

Hi, I have a Perl CGI script that emits different HTML apparently randomly. None of the inputs change. E.g., I will run wget twice and get two different results. The CGI is backed by a development database that, too, doesn't change. I have a debug statement that informs me that the same number of elements are returned from the DB into...

Printing HTML in Python CGI

Hey all, I've been teaching myself python and cgi scripting, and I know that your basic script looks like #!/usr/local/bin/python import cgi print "Content-type: text/html" print print "<HTML>" print "<BODY>" print "HELLO WORLD!" print "</BODY>" print "</HTML>" My question is, if I have a big HTML file I want to display in python (...

How can I add a search feature to a website that returns images?

Hello, I need to add a search feature to a website. Not being adept at PERL or PHP, I was thinking of adding a remotely hosted search CGI (like freefind or fusionbot). Alternately, I might end up trying to convert the HTML site to a Wordpress site (as I think I may be able to add a search function relatively easily once that is achiev...