Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl Beginner : can I PLEASE get some help, please ?

Status
Not open for further replies.

JoelKirch

Programmer
Sep 16, 2002
6
US
Every time I go to test my perl script Internet Explorer wants to download the .pl or .cgi file, how do I get it to automatically run the script without download ? all I'm doing is a link like a href="images.pl" or a href="images.cgi" how do I get it to run the script instead of download it ?
 
Can you PLEASE give us some details, if you want help ? You wrote only that you use IE. No version, no operating system, no web server, no Perl interpreter. Sorry, but I can say only, that or the web server does not know the MIME type of the .pl file, or the interpreter is not found. Since I like the simple solutions, I write what I use : Windows'98, Xitami web server, nsPerl. But for beginer maybe is better to try Abyss web server.
 
I'm running Windows XP, with TheServer ( that's the name of the prog. ) with ActivePerl... and I still can't get it to work, argh ...
 
JoelKirk, Your gonna need a better server program than that. from what i have heard "theServer" probably doesnt even support cgi. also i know there is a serious security vulnerability with it if u use the log feature. i would recomend that you set yourself up with iis, im pretty sure its included with xp home (i know it is with professional). once you do that you should visit activestate's site and download the latest version of the active perl msi installer.it will do all the script mappings and other what not that you need to do for you
best of Luck
 
Hi JoelKirch,

IIS can be a bit of a dog if you're just starting out. A lightweight webserver, the likes of Xitami from is well documented. Its deliberately designed to run fast, and caters for CGI support very well


Just thinking - you have the shebang line at the top of the script?

HTH Paul
 
the problem ISN'T the web hosting, in fact I uninstalled TheServer a while ago because it gave win95's on my network the blue-screen of doom... I just want to run the script so it outputs as a web-page...
 
The webserver is what associates your perl script (file with .pl, .plx, or .cgi file extension) with the perl executable. example in iis you would associate the .pl file extension with PerlPath/bin/perl.exe "%S" %S. that way when a client requests the .pl file, iis would pass perl.exe the path of the .pl file, run it, then return the html to the client. in order for you clients to get html feed back both your webserver and perl MUST be in place. simply opening a .pl file from explorer will just open the file for editing. you must go through a webserver with a url (ie in order for the script to be executed. the only alternative would be to make batch files that pass the perl.exe the script, but activestate does not recoment this, because it could present a security vulnerability
 
that's what I WAS doing and all it did was try to download the script, TheServer DOES support CGI, Windows XP Home edition DOES NOT have IIS ... and also, I suppose more than just activestate doesn't recommend making your PC's Batch Files open to the general public ... I guess I'll have to wait a few semesters to get into advanced web-scripting to see what's wrong ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top