cgi

How do I schedule one-time tasks from a Perl CGI application?

I am writing an application to allow users to schedule one-time long-running tasks from a web application (Linux/Apache/CGI::Application). To do this I use the the Schedule::At module which is the Perl interface to the "at" command. Since the scheduled tasks are not repeating, I am not considering "cron". I have two issues with "at" thou...

Should I migrate from CGI.pm to CGI::Simple?

I just noticed CGI::Simple while looking something up for the CGI.pm module. Should I be using CGI::Simple instead? What will it offer me over CGI.pm, which I've used for eight years? I see that CGI::Simple doesn't do HTML generation; what should I be using for that? And will it integrate with CGI::Simple by allowing me to make form ...

How can I fork a Perl CGI program to hive off long-running tasks?

I am writing a Bulk Mail scheduler controlled from a Perl/CGI Application and would like to learn abut "good" ways to fork a CGI program to run a separate task? Should one do it at all? Or is it better to suffer the overhead of running a separate job-queue engine like Gearman or TheSchwartz as has been suggested recently. Does the answer...

Simple and persistent CGI interface

I like the simplicity of CGI with Apache, but would like to be able to just leave my code running between CGI requests. mod_perl keeps coming up in this context, except that I'm not writing in Perl. I'm aware of FastCGI, but am looking for something much simpler - something that doesn't involve networking or libraries in the CGI progra...

Multiple Page Check Box Handling

Hi, In GMail, the mails are listed. When we we have lots of mails (ex:50), we can select and go to next page, select some more mail, and come back to page 1. But whatever mails the user checked will still be checked. I just want to implement the same operation. How would I do that? Thanks, Krish Note: I don't want to use AJAX. I'...

How to Access Java Script Variable in CGI

Hi, How to access Javascript Gobal Variable into CGI Program Thanks , Chells ...

How can I send XML to a CGI program from Perl?

Hi, I want to send some XML from a Perl program to a CGI script that makes use of XML::Simple to take that XML as input and send XML as output. Is there a way to send XML to a CGI script from Perl? Any help in this regards would be really appreciated. Thank You ...

get template checkbox names

How to get the checkbox names when that form is loaded by html template. in Java Script? ...

Python 3, is using sys.stdout.buffer.write() good style?

After I learned about reading unicode files in Python 3.0 web script, now it's time for me to learn using print() with unicode. I searched for writing unicode, for example this question explains that you can't write unicode characters to non-unicode console. However, in my case, the output is given to Apache and I am sure that it is cap...

POSTing an HTML form to remote.cgi - written in Ruby?

I am working on a website hosted on microsoft's office live service. It has a contact form enabling visitors to get in touch with the owner. I want to write a Ruby script that sits on a seperate sever and which the form will POST to. It will parse the form data and email the details to a preset address. The script should then redirec...

How can I read the URL parameter in a Perl CGI program?

How can I read the URL parameter in a Perl CGI program? ...

Why is my Perl source code being displayed in the browser?

What does it mean when I access my Perl script via URL, but when I do, the source code is printed on the screen? Does this mean that Perl isn't properly set up? I'm using Apache on Fedora. ...

How to maintain sessions with C++ code?

There is a cgi code written in C++. Currently there is no session management done in the web pages. There is a need to provide sessions in the web pages so that the user can login, maintain session and then logoff. While this is a fairly simple task in java with HttpSession, I have no clue how to do this with C++ code. ...

Python cgi performance

I own a legacy python application written as CGI. Until now this works OK, but the number of concurrent users will increment largely in the very near future. Here on SO I read: "CGI is great for low-traffic websites, but it has some performance problems for anything else". I know it would have been better to start in another way, but CGI...

C++ CGI and MySQL problem (mysql++)

Hi I'm trying to use c++ in cgi programs and everything is ok if i don't use mysql. Without mysql my site is generated in about 1-2 ms, but if I add only one variable or function from mysql++ library, site is generated in ~35 ms! (with php it's about 15 - 25 ms all time) I suppose it's a problem with dll loading ( there are two, and mys...

How can I reliably determine uploaded file name in a Perl CGI script?

The filename passed from an upload form to a Perl CGI (using CGI.pm) script depends on the client machine and may contain client-dependent path separators. Is there a reliable way of parsing the passed parameter to determine the filename (usually the last sub-string following the last path separator). ...

Why can't I send email using Perl CGI script on CentOS?

I'm using this CGI script. CGI is working, but I cannot sent emails from this form in CentOS. Please help me? Do I have to set-up anything for it? or MTA? ...

CGI-call to .aspx page

Hi, I have the following scenario. I have created an ASP.NET web application (framework 3.5) for my company, which allows users to purchase goods or services. Then, the user clicks on "Proceed to Payment", which calls an external payment site. The user then enters the card details through this site. The payment site are performing a CG...

How can I write a Perl web app that supports CGI, FastCGI and mod_perl?

How can I write a web application in Perl so that it can work as plain CGI script, as FastCGI / FCGI script, and from mod_perl / mod_perl2 (preferably using only core Perl modules and those from libwww-Perl, and minimizing number of Perl CPAN modules one has to install)? I'd like to minimize changes one has to do to change script from u...

Python + CGI script cannot access environment variables

I'm coding a webservice on python that uses an Oracle database. I have cx_Oracle installed and working but I'm having some problems when I run my python code as CGI using Apache. For example the following code works perfectly at the command line: #!/usr/bin/python import os import cx_Oracle import defs as df os.putenv('ORACLE_HOME...