Search the Q&A Archives

# Windows 2000 server IIS 5 perl 5.6.1 (activestate) I...

<< Back to: comp.lang.perl.* FAQ 0/5 - Introduction

 Question by tbbatccc Submitted on 11/7/2003 Related FAQ: comp.lang.perl.* FAQ 0/5 - Introduction Rating: Not yet rated Rate this question: N/A Worst Weak OK Good Great Windows 2000 server IIS 5 perl 5.6.1 (activestate) I am trying to run a PERL script prltst.cgi !#E:\perl\bin\perl print "Content-type: text/html\n\n"; print "testcgi\n"; print "Hey\n"; When accessed via a browser, the script does not execute, the entire file gets displayed. When run from command level "perl prltst.cgi", I get the executed statements, as expected. I have read/execute,run scripts/executables permissions on the IIS directory, also added a .cgi test/x-perl MIME type at the server level. I added admin level to the internet user setup.  I checked the attribs on the perl exe. Can anyone assist or point me in a direction.  This is not the first IIS/Win 2k server I have this running on, just the first one that doesn't work... Thanks in advance.. TBBATCCC I

 Answer by travis Submitted on 1/13/2004 Rating: Not yet rated Rate this answer: N/A Worst Weak OK Good Great You need to configure the directory the file is in to recognize the .pl file extension and use the perlis.dll script engine or perl.exe (./Perl/bin/perl.exe) to interpret it.  Go to IIS and set this up.  Check Microsoft's website for documentation on using IIS

 Answer by justpassingthrough Submitted on 3/5/2004 Rating: Rate this answer: N/A Worst Weak OK Good Great I hope I'm not being a fool, but could part of the problem be the "bangline" being written as "!#\path\to\perl" and not "#!\path\to\perl".  (Note '#' and '!' order...) Another possible problem could be the "" character used instead of the "/" one.  I'm not overly familiar with whether the bangline on MS systems wants "/"s as in the "open()" usage or ""s as in the "cmd" method), but I'd look at the other solution first, then check that .cgi is associated with the perl interpreter (within OS and IIS setup) then mess around with the bangline path. Hope that makes sense.

 Answer by Chiddo Submitted on 6/1/2004 Rating: Not yet rated Rate this answer: N/A Worst Weak OK Good Great If you have not had resolution on this yets... perhaps this will help: I run Active State Perl 5.6.1x on Windows 2k Server SP4.  What I did is a bit of a work around.  IT does not resolve the usage of Perl files with the .pl extension.  I to have had that problem.... Here is my interim solution: make sure you have ASP.pm installed (Win32::ASP). This can be done on the command line with "ppm install Win32-ASP" Next make sure to use "USE ASP qw(:strict);" in your perl script.  the ASP module is needed because perl will output to STDOUT which is not really pipped when you run scripts.  next take your script and enclose it in an asp file. Use "<%@ Language= "Perlscript" %>" and then enclose the entire script in "<% %>" as required by ASP semantics.   Example file: ============================= <%@ Language="Perlscript" %> what's <% use ASP qw(:strict); print "this"; %> ======================== Hope this helps good luck, Chiddo

 Answer by Sumit Bhatia Submitted on 6/2/2004 Rating: Rate this answer: N/A Worst Weak OK Good Great Bhutnike, madarchod, bhen ke lore, agar kisi ko is ka answer pata ho to madarchodo mujhe jarur batana. if any one of u knows the answer then p'ze mail me also. thanks

 Answer by Rinu Rajan Submitted on 11/19/2004 Rating: Not yet rated Rate this answer: N/A Worst Weak OK Good Great Check your Network settings to see if the TCP IP program is installed, if not it would not execute.

 Answer by D. B. Rawat Submitted on 11/4/2005 Rating: Not yet rated Rate this answer: N/A Worst Weak OK Good Great 1. Start Regedt32.exe and open the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC \Parameters\ScriptMap   2. Click Add Value from the Edit menu.   3. The Value Name is .pl   4. The Data type is REG_SZ.   5. The String value is \perl.exe %s %s NOTE: The "%s %s" is case sensitive. (e.g. "%S %S" will not work).   6. Restart the WWW service.   Now that you can test the PERL script with your browser.

 Answer by Rahul Singh Submitted on 5/17/2006 Rating: Not yet rated Rate this answer: N/A Worst Weak OK Good Great Gaand mein Danda.

Your answer will be published for anyone to see and rate.  Your answer will not be displayed immediately.  If you'd like to get expert points and benefit from positive ratings, please create a new account or login into an existing account below.