Ejecutar cgi PERL en IIS 4.0
Alfonso, Javier E (SAIC)
AlfonsJE@BP.com
Fri, 6 Feb 1998 08:15:02 -0500
Jose
A continuacion copio un mensaje de otro grupo de noticias acerca del tema.
Espero que te sirva
Subject: Re: IIS4 and CGI problems
From: "Diran A." <entrpneur@earthlink.net>
Date: 1998/02/01
Message-ID: <34D439E5.6AB5@earthlink.net>
Content-Transfer-Encoding: 7bit
References: <34D240B5.6286@objnet.com>
To: Steven Pham <steven@objnet.com>
Content-Type: text/plain; charset=us-ascii
MIME-Version: 1.0
Reply-To: entrpneur@earthlink.net
Newsgroups: microsoft.public.inetserver.iis
Steven Pham wrote:
>
> I am trying to upgrade to IIS4 from IIS3.
> All of my Perl CGI scripts stop working due to
> the following problem with IIS:
>
> If you spawn another program from your perl CGI
> script using system() function. All output of this
> spawned program will not be redirected to the web server.
> For example, my perl CGI script calls my external binary
> program which does some calculation and write its result
> to standard output. In IIS3, this output is redirected correctly
> and got return to the browser, but this doesn't work with IIS4.
>
> Can anyone out there or Microsoft shed some light about this
> problem....
>
> Thank you in advance.
>
> Steven Pham, steven@object-net.com
I found this post in the newsgroups, and it sure came in handy when Perl
was giving us problems during our
server software conversion.
I thought some of you would benefit from it, so I reprinted it here with
the proper credits to the author.
************************************************
>>From Steve West
Date Wed, 07 Jan 1998 11:43:50 -0800
Newsgroups comp.lang.perl.misc
Message-ID
For all you who are trying to run IIS 4.0 and perl here is what you have
to do to configure it to run properly on IIS 4.0.
I have outlined a two step process to get it to work...here goes
****** STEP 1. CONFIGURE PERL TO WORK WITH IIS 4.0*****
Microsoft changed from having the script mappings in the registry to the
a
configuration in the service manager. Now script mappings are changed
in the
default website properties.
Go to the default website, right mouse click on the properties for that
site....
then click on "Home Directory" tab
Go to the "Applications Settings" toward the bottom of the window...find
the "Configuration" button...the click on it. A new window called
script
mappings exists..you need to either create a new script mappings or edit
the old
one.
It should look like this
.cgi c:\perl\bin\perl.exe %s %s
.pl c:\perl\bin\perl.exe %s %s
I had those set before in the registry...as you may have too...and MS
IIS 4.0
pulled the values out and capitalized the %S %S...that wont work..it
looked like
this
*** MICROSOFT PUT THIS THERE...IT WILL NOT WORK ***
.pl C:\PERL\BIN\PERL.EXE %S %S
*** YOU MUST CHANGE MAPPING TO LOOK LIKE THIS***
.cgi c:\perl\bin\perl.exe %s %s
.pl c:\perl\bin\perl.exe %s %s
***** STEP 2. CONFIGURE PERL TO WORK WITH STANDARD I/O *****
By default you cannot use standard I/O redirection with perl and IIS
4.0.
You have to configure this into the metabase. Here is how you do it:
You need to run a command line from the:
"\winnt\system32\inetsrv\adminsamples" directory
When you get there type this on the command prompt
adsutil set w3svc/CreateCGIWithNewConsole TRUE
You may get an error becuase the .vbs is not set, just click on yes, and
retype the command if you get that error.
You will have to stop the default website, and restart it from the
internet service manager to make the changes.
NOTE: If for some reason you cannot get the adsutil at the command
prompt, or you get unrecognized command, you may want to search for it
using the start menu, find. Look on your system for "adsutil.vbs". If
you still cannot find it, you perhaps did not install all the
samples...you may go to the Windows NT 4.0 Option pack setup from the
start menu and check to see if you can install the administration
samples. I am not sure if the adsutil.vbs shipped in all cases, but
most of you will have it in your
"winnt\system32\inetsrv\adminsamples" directory.
I hope this note helps you guys and keeps you from having same trouble I
had.
Steve West<<
*****************************************
See our NT Server Solutions BBS at:
http://www.elitehost.com/cgi-bin/copromote/nt
Hope that helps,
Diran Alemshah
> ----------
> From: Jose Ignacio[SMTP:jopinet@writeme.com]
> Sent: 06 February 1998 04:31
> To: cgi@sun.jet.es; nt@deneb.adi.uam.es; perl@tlali.iztacala.unam.mx
> Subject: Ejecutar cgi PERL en IIS 4.0
>
> <<File: smime.p7s>>
> No puedo ejecutar y creo que he puesto los permisos necesarios.
> Error
> CGI Error
>
> The specified CGI application misbehaved by not returning a complete set
> of HTTP headers. The headers it did
> return are:
>
> Can't open perl script "?????????????????i?i": Invalid argument
>
> Es que IIS 4 es distinto a IIS 3 en sus cabecereas porque antes me
> funcionaba todo bien
> Saludos
>
> --
> Jose Ignacio
>