cgi

How would you implement FORM based authentication without a backing database?

I have a PHP script that runs as a CGI program and the HTTP Authenticate header gets eaten and spit out. So I would like to implement some kind of FORM based authentication. As an added constraint, there is no database so no session data can be stored. I am very open to having a master username and password. I just need to protect the a...

Why can't I connect to my CAS server with Perl's AuthCAS?

I'm attempting to use an existing CAS server to authenticate login for a Perl CGI web script and am using the AuthCAS Perl module (v 1.3.1). I can connect to the CAS server to get the service ticket but when I try to connect to validate the ticket my script returns with the following error from the IO::Socket::SSL module: 500 Can't co...

Directory Sizes on Remote Host

My hosting company does not provide an interface for me to see which folders are consuming the most amount of space so what I'm looking for is something that will show me the size of each folder within my main folder recursively, I don't know of anything on the Internet, and did a few searches however I came up with no results. This is ...

Pros and Cons of different approaches to web programming in Python

I'd like to do some server-side scripting using Python. But I'm kind of lost with the number of ways to do that. It starts with the do-it-yourself CGI approach and it seems to end with some pretty robust frameworks that would basically do all the job themselves. And a huge lot of stuff in between, like web.py, Pyroxide and Django. Wha...

How can I fork a background processes from a Perl CGI script on Windows?

I've had some trouble forking of processes from a Perl CGI script when running on Windows. The main issue seems to be that 'fork' is emulated when running on windows, and doesn't actually seem to create a new process (just another thread in the current one). This means that web servers (like IIS) which are waiting for the process to fini...

Call Visitors web stat program from PHP

I've been looking into different web statistics programs for my site, and one promising one is Visitors. Unfortunately, it's a C program and I don't know how to call it from the web server. I've tried using PHP's shell_exec, but my web host (NFSN) has PHP's safe mode on and it's giving me an error message. Is there a way to execute the ...

python cgi on IIS

How do you set up IIS so that you can call python scripts from asp pages? Ok, so I found the answer to that question here: http://support.microsoft.com/kb/276494 So on to my next question: How do you call a cgi script from within classic asp (vb) code? Particularly one which is not in the web root directory. ...

Can I implement a web user authentication system in python without POST?

My university doesn't support the POST cgi method (I know, it's crazy), and I was hoping to be able to have a system where a user can have a username and password and log in securely. Is this even possible? If it's not, how would you do it with POST? Just out of curiosity. Cheers! ...

How can I limit execution time for a Perl script in IIS?

This is a shared hosting environment. I control the server, but not necessarily the content. I've got a client with a Perl script that seems to run out of control every now and then and suck down 50% of the processor until the process is killed. With ASP scripts, I'm able to restrict the amount of time the script can run, and IIS will...

Where does CGI.pm normally create temporary files?

On all my Windows servers, except for one machine, when I execute the following code to allocate a temporary files folder: use CGI; my $tmpfile = new CGITempFile(1); print "tmpfile='", $tmpfile->as_string(), "'\n"; The variable $tmpfile is assigned the value '.\CGItemp1' and this is what I want. But on one of my servers it's incorrect...

Perl: variable scope issue with CGI & DBI modules

I've run into what appears to be a variable scope issue I haven't encountered before. I'm using Perl's CGI module and a call to DBI's do() method. Here's the code structure, simplified a bit: use DBI; use CGI qw(:cgi-lib); &ReadParse; my $dbh = DBI->connect(...............); my $test = $in{test}; $dbh->do(qq{INSERT INTO events VALUES (?...

Will everything in the standard library treat strings as unicode in Python 3.0?

I'm a little confused about how the standard library will behave now that Python (from 3.0) is unicode-based. Will modules such as CGI and urllib use unicode strings or will they use the new 'bytes' type and just provide encoded data? ...

Free hosting for C CGI

For an Open Source project, I'd like to allow people to test the application via WEB to see if it's what they were looking for. The application is in C but I've not found a free hosting that would allow me to upload my application. The reason why in general they don't allow to do it is rather obvious but maybe there's an OS-friendly se...

Are there alternatives to CGI (and do I really need one)?

I am designing an application that is going to consist of 3-4 services that run as separate processes and are linked by a suitable IPC. The system is going to have a web interface and I want to use whatever webserver is there. The web interface should be accessed under some URL that allows to have other URLs on the same webserver doing ...

What's the best approach to migrate a CGI to a Framework?

Hi, i have a big web application running in perl CGI. It's running ok, it's well written, but as it was done in the past, all the html are defined hardcoded in the CGI calls, so as you could imagine, it's hard to mantain, improve and etc. So now i would like to start to add some templating and integrate with a framework (catalyst or CGI:...

How can I handle HTTP file uploads?

How would I write a Perl CGI script that receives a file via a HTTP post and saves that to the file system? ...

Redirect Standard Output Efficiently in .NET

I am trying to call php-cgi.exe from a .NET program. I use RedirectStandardOutput to get the output back as a stream but the whole thing is very slow. Do you have any idea on how I can make that faster? Any other technique? Dim oCGI As ProcessStartInfo = New ProcessStartInfo() oCGI.WorkingDirectory = "C:\Program Files\Applicati...

How can I add internationalization to my Perl script?

Hi there, I'm looking at introducing multi-lingual support to a mature CGI application written in Perl. I had originally considered rolling my own solution using a Perl hash (stored on disk) for translation files but then I came across a CPAN module which appears to do just what I want (i18n). Does anyone have any experience with in...

Is CGI in any way bettern than Servlets?

We have a web reporting application that was built with cgi (C/C++) 10 years back. Due to performance and security issues, it needs to be rearchitectured. What could be the best technology solution to re-engineer the cgi based architecture? ...

How secure are CGI based web apps?

A very well known major drawback of using CGI is poor webserver performance. But how secure are CGI (mainly C/C++) based applications? Are there any major security holes in CGI architecture built on C/C++? I would like to know some real life implementations of CGI based web apps/web sites. One that I know of is javaranch.com. ...