Forum Moderators: coopster & phranque

Message Too Old, No Replies

File Download Pop-up on Submission

         

hlbuss

6:34 am on Oct 30, 2003 (gmt 0)

10+ Year Member



I have perl installed on a machine running windows XP. I have no problems running perl programs from the command line on this computer, but when I try to run them on submission of an HTML form, I get a "File Download" popup that asks:

You are downloading

file.pl from c:\path\file.pl

Would you like to open the file or save it to your computer?

This is the same thing that pops up when I download any program online, which is normal of course. However, I've never had it occur when submitting forms online, only when testing the forms on my home computer.

If I click "open" to try and run the file, the perl command line interpreter pops up waiting for an input, and the program totally disregards my form input.

Anyone know why this is happening?

MonkeeSage

6:50 am on Oct 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There is a difference the Perl CLI (Command-Line Interface) and CGI (Common Gateway Interface)...to process the HTML form you need to use CGI, which will require a web-server. What the CGI does is evaluate the HTML and fill in some environment variables that the script can then access, and then it returns the script output back to the client (the web-browser).

You can install Apache, Xitami, or OmniHTTPD lite (and probably others I'm forgetting); all of which are free web-servers (the latter two being lighter than the former, which is production grade), can run on XP, and support CGI scripts (PHP and eRuby as well as Perl, with a bit of tinkering). Just use it for your local script sandbox and bind it to localhost or 127.0.0.1. That's what alot of us do. Short of that I'm not aware of any way to run Perl CGI scripts locally.

Jordan

hlbuss

8:49 am on Oct 30, 2003 (gmt 0)

10+ Year Member



Thanks. Just got it working with Xitami. I've also answered a couple more questions along the way. :-)