 |
|
 |
|
Next: Apache sluggish
|
| Author |
Message |
External

Since: May 08, 2007 Posts: 4
|
(Msg. 1) Posted: Tue May 08, 2007 10:46 am
Post subject: IIS, PerlIS.dll, and perl scripts. Archived from groups: microsoft>public>inetserver>iis (more info?)
|
|
|
Hi all,
I've installed ActiveState Perl 5.8.8 to work along side IIS and we are
using perlis.dll as the parser. What is happening is that when ever we
view a perl script we only see the html code printed out. I'm told that
it is a result of result of perlis.dll sending default CGI HTTP headers
and that we should turn them off, and that this is possibly done via a
registry setting.
Does anyone know how to prevent perlis.dll from sending these default
headers by disabling that feature in the registry?
Thanks very much. >> Stay informed about: IIS, PerlIS.dll, and perl scripts. |
|
| Back to top |
|
 |  |
External

Since: Nov 14, 2007 Posts: 361
|
(Msg. 2) Posted: Tue May 08, 2007 11:42 am
Post subject: Re: IIS, PerlIS.dll, and perl scripts. [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On May 8, 11:46 am, sefs <sefs... DeleteThis @yahoo.com> wrote:
> Hi all,
>
> I've installed ActiveState Perl 5.8.8 to work along side IIS and we are
> using perlis.dll as the parser. What is happening is that when ever we
> view a perl script we only see the html code printed out. I'm told that
> it is a result of result of perlis.dll sending default CGI HTTP headers
> and that we should turn them off, and that this is possibly done via a
> registry setting.
>
> Does anyone know how to prevent perlis.dll from sending these default
> headers by disabling that feature in the registry?
>
> Thanks very much.
Are you saying that when you view a Perl script with http://server/Script.pl
that you want to see its raw contents *without* being executed? i.e.
you want to see the Perl code, not the resulting HTML code from
executing the Perl code.
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
// >> Stay informed about: IIS, PerlIS.dll, and perl scripts. |
|
| Back to top |
|
 |  |
External

Since: May 08, 2007 Posts: 4
|
(Msg. 3) Posted: Wed May 09, 2007 9:21 am
Post subject: Re: IIS, PerlIS.dll, and perl scripts. [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
No. What we are seeing is actual html code displayed in the window, as
if the perl sript is not being parsed and executed. We have to
approriate permissions on the directory and set up iis to recognize the
pl and cgi extension.
What we were looking for is for the perl script to run correctly instead
of printing out actual code to the screen.
Thanks.
David Wang wrote:
> On May 8, 11:46 am, sefs <sefs... RemoveThis @yahoo.com> wrote:
>> Hi all,
>>
>> I've installed ActiveState Perl 5.8.8 to work along side IIS and we are
>> using perlis.dll as the parser. What is happening is that when ever we
>> view a perl script we only see the html code printed out. I'm told that
>> it is a result of result of perlis.dll sending default CGI HTTP headers
>> and that we should turn them off, and that this is possibly done via a
>> registry setting.
>>
>> Does anyone know how to prevent perlis.dll from sending these default
>> headers by disabling that feature in the registry?
>>
>> Thanks very much.
>
>
>
> Are you saying that when you view a Perl script with http://server/Script.pl
> that you want to see its raw contents *without* being executed? i.e.
> you want to see the Perl code, not the resulting HTML code from
> executing the Perl code.
>
>
> //David
> http://w3-4u.blogspot.com
> http://blogs.msdn.com/David.Wang
> //
> >> Stay informed about: IIS, PerlIS.dll, and perl scripts. |
|
| Back to top |
|
 |  |
External

Since: Nov 14, 2007 Posts: 361
|
(Msg. 4) Posted: Wed May 09, 2007 12:49 pm
Post subject: Re: IIS, PerlIS.dll, and perl scripts. [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
The user already has ISAPI version configured. You are giving
instructions for the CGI version.
Misconfiguration of Application Mapping will not result in the
observation.
> You will need to wait for the worker process to recycle
> (default 29 hours) or manually recycle the worker
> processes by right-clicking on the extensions
> mapping categories (there are three in IIS6)
> and going to "recycle". Or reboot.
All of this is incorrect. Application Mapping changes take effect
immediately. No process recycle or system reboot required.
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
On May 9, 6:45 am, ".._.." <.... RemoveThis @yourmom.mil> wrote:
> I think your DLL mapping is where you went wrong.
>
> Pull it out and replace it with this one in the executables extensions area:
>
> PERL IIS setup
>
> c:\perl\bin\perl.exe "%s" %s
>
> .pl
>
> ALL VERBS
>
> Check script [checked]
>
> Check exists [checked]
>
> (Find your PERL.exe file wherever it is and modify the path)
>
> You will need to wait for the worker process to recycle (default 29 hours)
> or manually recycle the worker processes by right-clicking on the extensions
> mapping categories (there are three in IIS6) and going to "recycle". Or
> reboot.
>
> "sefs" <sefs... RemoveThis @yahoo.com> wrote in message
>
> news:%23pKsZ0jkHHA.4596@TK2MSFTNGP05.phx.gbl...
>
>
>
> > No. What we are seeing is actual html code displayed in the window, as if
> > the perl sript is not being parsed and executed. We have to approriate
> > permissions on the directory and set up iis to recognize the pl and cgi
> > extension.
>
> > What we were looking for is for the perl script to run correctly instead
> > of printing out actual code to the screen.
>
> > Thanks.
>
> > David Wang wrote:
> >> On May 8, 11:46 am, sefs <sefs... RemoveThis @yahoo.com> wrote:
> >>> Hi all,
>
> >>> I've installed ActiveState Perl 5.8.8 to work along side IIS and we are
> >>> using perlis.dll as the parser. What is happening is that when ever we
> >>> view a perl script we only see the html code printed out. I'm told that
> >>> it is a result of result of perlis.dll sending default CGI HTTP headers
> >>> and that we should turn them off, and that this is possibly done via a
> >>> registry setting.
>
> >>> Does anyone know how to prevent perlis.dll from sending these default
> >>> headers by disabling that feature in the registry?
>
> >>> Thanks very much.
>
> >> Are you saying that when you view a Perl script with
> >>http://server/Script.pl
> >> that you want to see its raw contents *without* being executed? i.e.
> >> you want to see the Perl code, not the resulting HTML code from
> >> executing the Perl code.
>
> >> //David
> >>http://w3-4u.blogspot.com
> >>http://blogs.msdn.com/David.Wang
> >> //- Hide quoted text -
>
> - Show quoted text - >> Stay informed about: IIS, PerlIS.dll, and perl scripts. |
|
| Back to top |
|
 |  |
External

Since: Nov 14, 2007 Posts: 361
|
(Msg. 5) Posted: Wed May 09, 2007 1:04 pm
Post subject: Re: IIS, PerlIS.dll, and perl scripts. [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
If you are seeing actual HTML code and not Perl code in the browser
window, then the Perl script has been parsed and executed -- which
means the Application Mapping configuration is fine, Perl script is
correctly running, and is not a permissions issue.
I think that you have some custom configuration on the server which
causes the Perl-generated response to be treated as non-HTML by the
browser. Remember, browsers do not just parse the entity body, see
that it "looks like" HTML, and starts rendering it. HTTP Content-Type
controls how the browser renders the entity body, and contents of the
entity body also affect rendering.
I suspect you have a custom ISAPI Filter corrupting the response and
causing the browser to misinterpret it. Or it could be as you stated
-- ActiveState Perl is sending duplicate "default CGI HTTP headers".
In either case, you need to contact product support personel for the
ISAPI Filter or ActiveState for support. It is far easier to find
support for specific products from their respective dedicated
communications channel instead of a general forum like this.
If you can trigger this with a single request, can you use a tool like
WFetch to make the request and report the entire HTTP response, \r\n
included, so that we can determine what exactly is going awry.
http://www.microsoft.com/downloads/details.aspx?familyid=9bfa49bc-376b...54-95aa
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
On May 9, 10:21 am, sefs <sefs....RemoveThis@yahoo.com> wrote:
> No. What we are seeing is actual html code displayed in the window, as
> if the perl sript is not being parsed and executed. We have to
> approriate permissions on the directory and set up iis to recognize the
> pl and cgi extension.
>
> What we were looking for is for the perl script to run correctly instead
> of printing out actual code to the screen.
>
> Thanks.
>
>
>
> David Wang wrote:
> > On May 8, 11:46 am, sefs <sefs....RemoveThis@yahoo.com> wrote:
> >> Hi all,
>
> >> I've installed ActiveState Perl 5.8.8 to work along side IIS and we are
> >> using perlis.dll as the parser. What is happening is that when ever we
> >> view a perl script we only see the html code printed out. I'm told that
> >> it is a result of result of perlis.dll sending default CGI HTTP headers
> >> and that we should turn them off, and that this is possibly done via a
> >> registry setting.
>
> >> Does anyone know how to prevent perlis.dll from sending these default
> >> headers by disabling that feature in the registry?
>
> >> Thanks very much.
>
> > Are you saying that when you view a Perl script withhttp://server/Script.pl
> > that you want to see its raw contents *without* being executed? i.e.
> > you want to see the Perl code, not the resulting HTML code from
> > executing the Perl code.
>
> > //David
> >http://w3-4u.blogspot.com
> >http://blogs.msdn.com/David.Wang
> > //- Hide quoted text -
>
> - Show quoted text - >> Stay informed about: IIS, PerlIS.dll, and perl scripts. |
|
| Back to top |
|
 |  |
External

Since: Feb 05, 2007 Posts: 112
|
(Msg. 6) Posted: Wed May 09, 2007 1:45 pm
Post subject: Re: IIS, PerlIS.dll, and perl scripts. [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
I think your DLL mapping is where you went wrong.
Pull it out and replace it with this one in the executables extensions area:
PERL IIS setup
c:\perl\bin\perl.exe "%s" %s
..pl
ALL VERBS
Check script [checked]
Check exists [checked]
(Find your PERL.exe file wherever it is and modify the path)
You will need to wait for the worker process to recycle (default 29 hours)
or manually recycle the worker processes by right-clicking on the extensions
mapping categories (there are three in IIS6) and going to "recycle". Or
reboot.
"sefs" <sefsinc RemoveThis @yahoo.com> wrote in message
news:%23pKsZ0jkHHA.4596@TK2MSFTNGP05.phx.gbl...
> No. What we are seeing is actual html code displayed in the window, as if
> the perl sript is not being parsed and executed. We have to approriate
> permissions on the directory and set up iis to recognize the pl and cgi
> extension.
>
> What we were looking for is for the perl script to run correctly instead
> of printing out actual code to the screen.
>
> Thanks.
>
> David Wang wrote:
>> On May 8, 11:46 am, sefs <sefs... RemoveThis @yahoo.com> wrote:
>>> Hi all,
>>>
>>> I've installed ActiveState Perl 5.8.8 to work along side IIS and we are
>>> using perlis.dll as the parser. What is happening is that when ever we
>>> view a perl script we only see the html code printed out. I'm told that
>>> it is a result of result of perlis.dll sending default CGI HTTP headers
>>> and that we should turn them off, and that this is possibly done via a
>>> registry setting.
>>>
>>> Does anyone know how to prevent perlis.dll from sending these default
>>> headers by disabling that feature in the registry?
>>>
>>> Thanks very much.
>>
>>
>>
>> Are you saying that when you view a Perl script with
>> http://server/Script.pl
>> that you want to see its raw contents *without* being executed? i.e.
>> you want to see the Perl code, not the resulting HTML code from
>> executing the Perl code.
>>
>>
>> //David
>> http://w3-4u.blogspot.com
>> http://blogs.msdn.com/David.Wang
>> //
>> >> Stay informed about: IIS, PerlIS.dll, and perl scripts. |
|
| Back to top |
|
 |  |
External

Since: May 08, 2007 Posts: 4
|
(Msg. 7) Posted: Fri May 11, 2007 10:07 am
Post subject: Re: IIS, PerlIS.dll, and perl scripts. [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
I also found this online but am not sure if it applies to me or not...or
how to make use of it.
7.4. My CGI scripts don't seem to run right under PerlIS. What's wrong?
Scripts running under PerlIS are a lot like "nph" scripts, as defined in
the CGI/1.1 specification (see question 7.2). You have to specify the
HTTP response status line as well as all headers for the response.
Here's a sample that works under PerlIS:
print <<"END";
HTTP/1.0 200 OK
Content-Type: text/html
<HTML>
<HEAD>
<TITLE>PerlIS Response</TITLE>
</HEAD>
<BODY>
This is a PerlIS response.
</BODY>
</HTML>
END
If you don't add the HTTP status line, as above, the browser will assume
that it is talking to an HTTP/0.9 server (the HTTP spec says that the
difference between a 1.0 and an 0.9 server is the presence of the status
line, and that good browsers should accept 0.9 responses). It will then
try and treat your response headers as part of the HTML you are
returning, so your headers will show up in the browser window, which you
probably don't want.
There's a misperception that if you don't add the HTTP status line,
PerlIS will add one for you, plus a Content-Type header. This is false,
and can be checked with a little sockets coding. >> Stay informed about: IIS, PerlIS.dll, and perl scripts. |
|
| Back to top |
|
 |  |
External

Since: Nov 14, 2007 Posts: 361
|
(Msg. 8) Posted: Fri May 11, 2007 3:40 pm
Post subject: Re: IIS, PerlIS.dll, and perl scripts. [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Thanks for providing the response.
The problem is either with your Perl script and/or some custom ISAPI
Filter on the server. Your IIS configuration is fine, and the Perl
script is executing.
HTTP/1.1 200 OK\r\n
Date: Fri, 11 May 2007 13:58:54 GMT\r\n
Server: Microsoft-IIS/6.0\r\n
\r\n
Content-Type: text/html; charset=ISO-8859-1\r\n
\r\n
The reason the browser did not render the response as HTML is because
the "Content-Type: text/html" response header, which tells the browser
that the entity body is HTML and should be rendered as HTML, is
*AFTER* the first double \r\n. The significance of the double \r\n --
it is the boundary between response headers (in front of the first
double \r\n) and response entity body (anything after the first double
\r\n).
You can view response headers as "instructions" to the receiving agent
on how to handle the entity body "payload". Thus, Content-Type: text/
html as response header tells the browser to render the entity body as
HTML, while Content-Type: text/html as response entity body will be
merely displayed as-is by the browser.
In your response, the Content-Type: text/html text came *AFTER* the
first double \r\n, which means it is considered part of the entity
body. Thus, the browser got headers that indicate nothing about the
response content type nor length, so it just displayed it all as-is
and not rendered as HTML. No, web browsers do not automatically render
everything as an HTML web pages even though everyone calls them "web"
browsers -- they follow instructions in response Content-Type to
launch the appropriate client-side agent to render the entity body.
Browser behavior is undefined when Content-Type is absent, so you
cannot demand/rely on any specific behavior.
Why the Content-Type: response header is in the wrong place -- I
highly suspect it is a bug in the Perl script. You should contact
support personnel for your Perl script.
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
On May 11, 11:00 am, sefs <sefs... DeleteThis @yahoo.com> wrote:
> Hi there here is the response from wfetch, I used all the default
> settings just inputted the host name and path to the perl script.
>
> I have also attached it as a text file in case it does not display well
> in the post...
>
> **** start log
>
> started....
> WWWConnect::Close("agriculture.gov.bb","80")\n
> closed source port: 3261\r\n
> WWWConnect::Connect("agriculture.gov.bb","80")\n
> source port: 3274\r\n
> REQUEST: **************\n
> GET /library/cgi-bin/perldiver.pl HTTP/1.1\r\n
> Host: agriculture.gov.bb\r\n
> Accept: */*\r\n
> \r\n
> RESPONSE: **************\n
> HTTP/1.1 200 OK\r\n
> Date: Fri, 11 May 2007 13:58:54 GMT\r\n
> Server: Microsoft-IIS/6.0\r\n
> \r\n
> Content-Type: text/html; charset=ISO-8859-1\r\n
> \r\n
> <!DOCTYPE html\n
> \tPUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\n
> \t "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n
> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">\n
> <head>\n
> <title>Perl Diver : Main</title>\n
> <style type="text/css">\n
> <!--/* <![CDATA[ */\n
> body {\n
> background: "#FFFFF";\n
> scrollbar-face-color: "#FFCC66";\n
> scrollbar-shadow-color: "#FF6600";\n
> scrollbar-highlight-color: "#FFCC66";\n
> scrollbar-3dlight-color: "#FFFFFF";\n
> scrollbar-darkshadow-color: "#000000";\n
> scrollbar-track-color: "#E2DAD1";\n
> scrollbar-arrow-color: "#000000";\n
> font-size: "x-small";\n
> font-family: "arial,helvetica,sans-serif"\n
> }\n
> A:hover {\n
> background: "#ffcc66";\n
> color: "#336699";\n
> text-decoration: "overline"\n
> }\n
> A:link {\n
> color: "#BF0425"\n
> }\n
> A:visited {\n
> color: "#336699"\n
> }\n
> th,td,p {\n
> font-size: "x-small"\n
> }\n
> .label {\n
> font-family: "Geneva, Helvetica, sans serif";\n
> font-size: "x-small";\n
> font-weight: bold\n
> }\n
> .HL {\n
> font-size:\t"20pt";\n
>
> letter-spacing:\t".5pt";\n
> font-family: "geneva, arial, sans-serif";\n
> background: "#FDB900";\n
> }\n
> .heading {\n
> font-size: "x-large";\n
> letter-spacing:\t".5pt"\n
> }\n
> .a1 {\n
> background: wheat\n
> }\n
> .a2 {\n
> background: linen\n
> }\n
> .a3 {\n
> background: blanchedalmond\n
> }\n
> .progname {\n
> color: #bf0425;\n
> font-size: xx-large;\n
> }\n
> code,pre {\n
> font-face: "Courier New", mono;\n
> font-size: 11pt;\n
> }\n
> \n
> \n
> \n
> /* ]]> */-->\n
> </style>\n
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />\n
> </head>\n
> <body>\n
> <div class="progname">Perl Diver 2.33</div>
> <table bgcolor="black" border="0" cellspacing="0" cellpadding="1"
> width="100%"><tr><td><table bgcolor="white" cellspacing="0"
> cellpadding="1" width="100
> %"><tr><th class="a1">Main</th> <th class="a2"><a
> href="perldiver.pl?action=20">Environment Variables</a></th> <th
> class="a3"><a href="perldiver.pl?act
> ion=30">Perl Default Values</a></th> <th class="a1"><a
> href="perldiver.pl?action=40">Perl Config - Summary</a></th> <th
> class="a2"><a href="perldiver.p
> l?action=50">Perl Config - Full</a></th> <th class="a3"><a
> href="perldiver.pl?action=60">Installed Modules</a></th> <th
> class="a1"><a href="perldiver.p
> l?action=65">List Directory</a></th> <th class="a2"><a
> href="perldiver.pl?action=66">uptime</a></th> <th class="a3"><a
> href="perldiver.pl?action=2000">
> Docs</a></th></tr></table></td></tr></table><p /><table bgcolor="black"
> border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table
> bgcolor=
> "white" cellspacing="0" cellpadding="1" width="100%"><tr
> class="HL"><th><span class="heading">Main</span></th></tr><tr><td>Basic
> paths and information<
> /td></tr></table></td></tr></table><p /><table bgcolor="black"
> border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table
> bgcolor="white" c
> ellspacing="0" cellpadding="1" width="100%"><tr class="a1"><td
> class="label" valign="top">Perl Executable</td> <td
> class="value">C:\Perl\bin\perlis.dll
> </td></tr>\n
> <tr class="a2"><td class="label" valign="top">Perl version</td> <td
> class="value">5.008008</td></tr>\n
> <tr class="a3"><td class="label" valign="top">Operating System Name</td>
> <td class="value">MSWin32</td></tr>\n
> <tr class="a1"><td class="label" valign="top">GID (If not blank, you are
> on a machine that supports membership in multiple groups
> simultaneously)</td>
> <td class="value">0</td></tr>\n
> <tr class="a2"><td class="label" valign="top">Path to Perl</td> <td
> class="value"></td></tr>\n
> <tr class="a3"><td class="label" valign="top">Path to sendmail</td> <td
> class="value"></td></tr>\n
> <tr class="a1"><td class
> ="label" valign="top">Directories searched for perl modules</td> <td
> class="value">C:/websites/barbados.gov.bb/www/agriculture/library/cgi-bin/<br
> />C:/
> Perl/site/lib<br />C:/Perl/lib<br
> />.</td></tr></table></td></tr></table><p /><table bgcolor="black"
> border="0" cellspacing="0" cellpadding="1" width="
> 100%"><tr><td><table bgcolor="white" cellspacing="0" cellpadding="1"
> width="100%"><tr class="HL"><th>Perl Diver brought to you by <a
> href="http://scrip
> tsolutions.com">ScriptSolutions.com</a> © 1997-
> 2007</th></tr></table></td></tr></table>\n
> </body>\n
> </html>
> finished.
>
> **** end log
>
>
>
> David Wang wrote:
>
> > If you can trigger this with a single request, can you use a tool like
> > WFetch to make the request and report the entire HTTP response, \r\n
> > included, so that we can determine what exactly is going awry.
>
>
>
> [agri-log.txt]started....
> WWWConnect::Close("agriculture.gov.bb","80")\n
> closed source port: 3261\r\n
> WWWConnect::Connect("agriculture.gov.bb","80")\n
> source port: 3274\r\n
> REQUEST: **************\n
> GET /library/cgi-bin/perldiver.pl HTTP/1.1\r\n
> Host: agriculture.gov.bb\r\n
> Accept: */*\r\n
> \r\n
> RESPONSE: **************\n
> HTTP/1.1 200 OK\r\n
> Date: Fri, 11 May 2007 13:58:54 GMT\r\n
> Server: Microsoft-IIS/6.0\r\n
> \r\n
> Content-Type: text/html; charset=ISO-8859-1\r\n
> \r\n
> <!DOCTYPE html\n
> \tPUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\n
> \t "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n
> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">\n
> <head>\n
> <title>Perl Diver : Main</title>\n
> <style type="text/css">\n
> <!--/* <![CDATA[ */\n
> body {\n
> background: "#FFFFF";\n
> scrollbar-face-color: "#FFCC66";\n
> scrollbar-shadow-color: "#FF6600";\n
> scrollbar-highlight-color: "#FFCC66";\n
> scrollbar-3dlight-color: "#FFFFFF";\n
> scrollbar-darkshadow-color: "#000000";\n
> scrollbar-track-color: "#E2DAD1";\n
> scrollbar-arrow-color: "#000000";\n
> font-size: "x-small";\n
> font-family: "arial,helvetica,sans-serif"\n
> }\n
> A:hover {\n
> background: "#ffcc66";\n
> color: "#336699";\n
> text-decoration: "overline"\n
> }\n
> A:link {\n
> color: "#BF0425"\n
> }\n
> A:visited {\n
> color: "#336699"\n
> }\n
> th,td,p {\n
> font-size: "x-small"\n
> }\n
> .label {\n
> font-family: "Geneva, Helvetica, sans serif";\n
> font-size: "x-small";\n
> font-weight: bold\n
> }\n
> .HL {\n
> font-size:\t"20pt";\n
>
> letter-spacing:\t".5pt";\n
> font-family: "geneva, arial, sans-serif";\n
> background: "#FDB900";\n
> }\n
> .heading {\n
> font-size: "x-large";\n
> letter-spacing:\t".5pt"\n
> }\n
> .a1 {\n
> background: wheat\n
> }\n
> .a2 {\n
> background: linen\n
> }\n
> .a3 {\n
> background: blanchedalmond\n
> }\n
> .progname {\n
> color: #bf0425;\n
> font-size: xx-large;\n
> }\n
> code,pre {\n
> font-face: "Courier New", mono;\n
> font-size: 11pt;\n
> }\n
> \n
> \n
> \n
> /* ]]> */-->\n
> </style>\n
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />\n
> </head>\n
> <body>\n
> <div class="progname">Perl Diver 2.33</div>
> <table bgcolor="black" border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table bgcolor="white" cellspacing="0" cellpadding="1" width="100
> %"><tr><th class="a1">Main</th> <th class="a2"><a href="perldiver.pl?action=20">Environment Variables</a></th> <th class="a3"><a href="perldiver.pl?act
> ion=30">Perl Default Values</a></th> <th class="a1"><a href="perldiver.pl?action=40">Perl Config - Summary</a></th> <th class="a2"><a href="perldiver.p
> l?action=50">Perl Config - Full</a></th> <th class="a3"><a href="perldiver.pl?action=60">Installed Modules</a></th> <th class="a1"><a href="perldiver.p
> l?action=65">List Directory</a></th> <th class="a2"><a href="perldiver.pl?action=66">uptime</a></th> <th class="a3"><a href="perldiver.pl?action=2000">
> Docs</a></th></tr></table></td></tr></table><p /><table bgcolor="black" border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table bgcolor=
> "white" cellspacing="0" cellpadding="1" width="100%"><tr class="HL"><th><span class="heading">Main</span></th></tr><tr><td>Basic paths and information<
> /td></tr></table></td></tr></table><p /><table bgcolor="black" border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table bgcolor="white" c
> ellspacing="0" cellpadding="1" width="100%"><tr class="a1"><td class="label" valign="top">Perl Executable</td> <td class="value">C:\Perl\bin\perlis.dll
> </td></tr>\n
> <tr class="a2"><td class="label" valign="top">Perl version</td> <td class="value">5.008008</td></tr>\n
> <tr class="a3"><td class="label" valign="top">Operating System Name</td> <td class="value">MSWin32</td></tr>\n
> <tr class="a1"><td class="label" valign="top">GID (If not blank, you are on a machine that supports membership in multiple groups simultaneously)</td>
> <td class="value">0</td></tr>\n
> <tr class="a2"><td class="label" valign="top">Path to Perl</td> <td class="value"></td></tr>\n
> <tr class="a3"><td class="label" valign="top">Path to sendmail</td> <td class="value"></td></tr>\n
> <tr class="a1"><td class
> ="label" valign="top">Directories searched for perl modules</td> <td class="value">C:/websites/barbados.gov.bb/www/agriculture/library/cgi-bin/<br />C:/
> Perl/site/lib<br />C:/Perl/lib<br />.</td></tr></table></td></tr></table><p /><table bgcolor="black" border="0" cellspacing="0" cellpadding="1" width="
> 100%"><tr><td><table bgcolor="white" cellspacing="0" cellpadding="1" width="100%"><tr class="HL"><th>Perl Diver brought to you by <a href="http://scrip
> tsolutions.com">ScriptSolutions.com</a> © 1997- 2007</th></tr></table></td></tr></table>\n
> </body>\n
> </html>
> finished.- Hide quoted text -
>
> - Show quoted text - >> Stay informed about: IIS, PerlIS.dll, and perl scripts. |
|
| Back to top |
|
 |  |
External

Since: May 08, 2007 Posts: 4
|
(Msg. 9) Posted: Fri May 18, 2007 12:00 pm
Post subject: Re: IIS, PerlIS.dll, and perl scripts. [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
We downgraded to perl 5.6 and that solved our problems.
David Wang wrote:
> Thanks for providing the response.
>
> The problem is either with your Perl script and/or some custom ISAPI
> Filter on the server. Your IIS configuration is fine, and the Perl
> script is executing.
>
>
> HTTP/1.1 200 OK\r\n
> Date: Fri, 11 May 2007 13:58:54 GMT\r\n
> Server: Microsoft-IIS/6.0\r\n
> \r\n
> Content-Type: text/html; charset=ISO-8859-1\r\n
> \r\n
>
>
> The reason the browser did not render the response as HTML is because
> the "Content-Type: text/html" response header, which tells the browser
> that the entity body is HTML and should be rendered as HTML, is
> *AFTER* the first double \r\n. The significance of the double \r\n --
> it is the boundary between response headers (in front of the first
> double \r\n) and response entity body (anything after the first double
> \r\n).
>
> You can view response headers as "instructions" to the receiving agent
> on how to handle the entity body "payload". Thus, Content-Type: text/
> html as response header tells the browser to render the entity body as
> HTML, while Content-Type: text/html as response entity body will be
> merely displayed as-is by the browser.
>
> In your response, the Content-Type: text/html text came *AFTER* the
> first double \r\n, which means it is considered part of the entity
> body. Thus, the browser got headers that indicate nothing about the
> response content type nor length, so it just displayed it all as-is
> and not rendered as HTML. No, web browsers do not automatically render
> everything as an HTML web pages even though everyone calls them "web"
> browsers -- they follow instructions in response Content-Type to
> launch the appropriate client-side agent to render the entity body.
> Browser behavior is undefined when Content-Type is absent, so you
> cannot demand/rely on any specific behavior.
>
> Why the Content-Type: response header is in the wrong place -- I
> highly suspect it is a bug in the Perl script. You should contact
> support personnel for your Perl script.
>
>
> //David
> http://w3-4u.blogspot.com
> http://blogs.msdn.com/David.Wang
> //
>
>
>
>
> On May 11, 11:00 am, sefs <sefs... DeleteThis @yahoo.com> wrote:
>> Hi there here is the response from wfetch, I used all the default
>> settings just inputted the host name and path to the perl script.
>>
>> I have also attached it as a text file in case it does not display well
>> in the post...
>>
>> **** start log
>>
>> started....
>> WWWConnect::Close("agriculture.gov.bb","80")\n
>> closed source port: 3261\r\n
>> WWWConnect::Connect("agriculture.gov.bb","80")\n
>> source port: 3274\r\n
>> REQUEST: **************\n
>> GET /library/cgi-bin/perldiver.pl HTTP/1.1\r\n
>> Host: agriculture.gov.bb\r\n
>> Accept: */*\r\n
>> \r\n
>> RESPONSE: **************\n
>> HTTP/1.1 200 OK\r\n
>> Date: Fri, 11 May 2007 13:58:54 GMT\r\n
>> Server: Microsoft-IIS/6.0\r\n
>> \r\n
>> Content-Type: text/html; charset=ISO-8859-1\r\n
>> \r\n
>> <!DOCTYPE html\n
>> \tPUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\n
>> \t "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n
>> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">\n
>> <head>\n
>> <title>Perl Diver : Main</title>\n
>> <style type="text/css">\n
>> <!--/* <![CDATA[ */\n
>> body {\n
>> background: "#FFFFF";\n
>> scrollbar-face-color: "#FFCC66";\n
>> scrollbar-shadow-color: "#FF6600";\n
>> scrollbar-highlight-color: "#FFCC66";\n
>> scrollbar-3dlight-color: "#FFFFFF";\n
>> scrollbar-darkshadow-color: "#000000";\n
>> scrollbar-track-color: "#E2DAD1";\n
>> scrollbar-arrow-color: "#000000";\n
>> font-size: "x-small";\n
>> font-family: "arial,helvetica,sans-serif"\n
>> }\n
>> A:hover {\n
>> background: "#ffcc66";\n
>> color: "#336699";\n
>> text-decoration: "overline"\n
>> }\n
>> A:link {\n
>> color: "#BF0425"\n
>> }\n
>> A:visited {\n
>> color: "#336699"\n
>> }\n
>> th,td,p {\n
>> font-size: "x-small"\n
>> }\n
>> .label {\n
>> font-family: "Geneva, Helvetica, sans serif";\n
>> font-size: "x-small";\n
>> font-weight: bold\n
>> }\n
>> .HL {\n
>> font-size:\t"20pt";\n
>>
>> letter-spacing:\t".5pt";\n
>> font-family: "geneva, arial, sans-serif";\n
>> background: "#FDB900";\n
>> }\n
>> .heading {\n
>> font-size: "x-large";\n
>> letter-spacing:\t".5pt"\n
>> }\n
>> .a1 {\n
>> background: wheat\n
>> }\n
>> .a2 {\n
>> background: linen\n
>> }\n
>> .a3 {\n
>> background: blanchedalmond\n
>> }\n
>> .progname {\n
>> color: #bf0425;\n
>> font-size: xx-large;\n
>> }\n
>> code,pre {\n
>> font-face: "Courier New", mono;\n
>> font-size: 11pt;\n
>> }\n
>> \n
>> \n
>> \n
>> /* ]]> */-->\n
>> </style>\n
>> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />\n
>> </head>\n
>> <body>\n
>> <div class="progname">Perl Diver 2.33</div>
>> <table bgcolor="black" border="0" cellspacing="0" cellpadding="1"
>> width="100%"><tr><td><table bgcolor="white" cellspacing="0"
>> cellpadding="1" width="100
>> %"><tr><th class="a1">Main</th> <th class="a2"><a
>> href="perldiver.pl?action=20">Environment Variables</a></th> <th
>> class="a3"><a href="perldiver.pl?act
>> ion=30">Perl Default Values</a></th> <th class="a1"><a
>> href="perldiver.pl?action=40">Perl Config - Summary</a></th> <th
>> class="a2"><a href="perldiver.p
>> l?action=50">Perl Config - Full</a></th> <th class="a3"><a
>> href="perldiver.pl?action=60">Installed Modules</a></th> <th
>> class="a1"><a href="perldiver.p
>> l?action=65">List Directory</a></th> <th class="a2"><a
>> href="perldiver.pl?action=66">uptime</a></th> <th class="a3"><a
>> href="perldiver.pl?action=2000">
>> Docs</a></th></tr></table></td></tr></table><p /><table bgcolor="black"
>> border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table
>> bgcolor=
>> "white" cellspacing="0" cellpadding="1" width="100%"><tr
>> class="HL"><th><span class="heading">Main</span></th></tr><tr><td>Basic
>> paths and information<
>> /td></tr></table></td></tr></table><p /><table bgcolor="black"
>> border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table
>> bgcolor="white" c
>> ellspacing="0" cellpadding="1" width="100%"><tr class="a1"><td
>> class="label" valign="top">Perl Executable</td> <td
>> class="value">C:\Perl\bin\perlis.dll
>> </td></tr>\n
>> <tr class="a2"><td class="label" valign="top">Perl version</td> <td
>> class="value">5.008008</td></tr>\n
>> <tr class="a3"><td class="label" valign="top">Operating System Name</td>
>> <td class="value">MSWin32</td></tr>\n
>> <tr class="a1"><td class="label" valign="top">GID (If not blank, you are
>> on a machine that supports membership in multiple groups
>> simultaneously)</td>
>> <td class="value">0</td></tr>\n
>> <tr class="a2"><td class="label" valign="top">Path to Perl</td> <td
>> class="value"></td></tr>\n
>> <tr class="a3"><td class="label" valign="top">Path to sendmail</td> <td
>> class="value"></td></tr>\n
>> <tr class="a1"><td class
>> ="label" valign="top">Directories searched for perl modules</td> <td
>> class="value">C:/websites/barbados.gov.bb/www/agriculture/library/cgi-bin/<br
>> />C:/
>> Perl/site/lib<br />C:/Perl/lib<br
>> />.</td></tr></table></td></tr></table><p /><table bgcolor="black"
>> border="0" cellspacing="0" cellpadding="1" width="
>> 100%"><tr><td><table bgcolor="white" cellspacing="0" cellpadding="1"
>> width="100%"><tr class="HL"><th>Perl Diver brought to you by <a
>> href="http://scrip
>> tsolutions.com">ScriptSolutions.com</a> © 1997-
>> 2007</th></tr></table></td></tr></table>\n
>> </body>\n
>> </html>
>> finished.
>>
>> **** end log
>>
>>
>>
>> David Wang wrote:
>>
>>> If you can trigger this with a single request, can you use a tool like
>>> WFetch to make the request and report the entire HTTP response, \r\n
>>> included, so that we can determine what exactly is going awry.
>>
>>
>> [agri-log.txt]started....
>> WWWConnect::Close("agriculture.gov.bb","80")\n
>> closed source port: 3261\r\n
>> WWWConnect::Connect("agriculture.gov.bb","80")\n
>> source port: 3274\r\n
>> REQUEST: **************\n
>> GET /library/cgi-bin/perldiver.pl HTTP/1.1\r\n
>> Host: agriculture.gov.bb\r\n
>> Accept: */*\r\n
>> \r\n
>> RESPONSE: **************\n
>> HTTP/1.1 200 OK\r\n
>> Date: Fri, 11 May 2007 13:58:54 GMT\r\n
>> Server: Microsoft-IIS/6.0\r\n
>> \r\n
>> Content-Type: text/html; charset=ISO-8859-1\r\n
>> \r\n
>> <!DOCTYPE html\n
>> \tPUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\n
>> \t "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n
>> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">\n
>> <head>\n
>> <title>Perl Diver : Main</title>\n
>> <style type="text/css">\n
>> <!--/* <![CDATA[ */\n
>> body {\n
>> background: "#FFFFF";\n
>> scrollbar-face-color: "#FFCC66";\n
>> scrollbar-shadow-color: "#FF6600";\n
>> scrollbar-highlight-color: "#FFCC66";\n
>> scrollbar-3dlight-color: "#FFFFFF";\n
>> scrollbar-darkshadow-color: "#000000";\n
>> scrollbar-track-color: "#E2DAD1";\n
>> scrollbar-arrow-color: "#000000";\n
>> font-size: "x-small";\n
>> font-family: "arial,helvetica,sans-serif"\n
>> }\n
>> A:hover {\n
>> background: "#ffcc66";\n
>> color: "#336699";\n
>> text-decoration: "overline"\n
>> }\n
>> A:link {\n
>> color: "#BF0425"\n
>> }\n
>> A:visited {\n
>> color: "#336699"\n
>> }\n
>> th,td,p {\n
>> font-size: "x-small"\n
>> }\n
>> .label {\n
>> font-family: "Geneva, Helvetica, sans serif";\n
>> font-size: "x-small";\n
>> font-weight: bold\n
>> }\n
>> .HL {\n
>> font-size:\t"20pt";\n
>>
>> letter-spacing:\t".5pt";\n
>> font-family: "geneva, arial, sans-serif";\n
>> background: "#FDB900";\n
>> }\n
>> .heading {\n
>> font-size: "x-large";\n
>> letter-spacing:\t".5pt"\n
>> }\n
>> .a1 {\n
>> background: wheat\n
>> }\n
>> .a2 {\n
>> background: linen\n
>> }\n
>> .a3 {\n
>> background: blanchedalmond\n
>> }\n
>> .progname {\n
>> color: #bf0425;\n
>> font-size: xx-large;\n
>> }\n
>> code,pre {\n
>> font-face: "Courier New", mono;\n
>> font-size: 11pt;\n
>> }\n
>> \n
>> \n
>> \n
>> /* ]]> */-->\n
>> </style>\n
>> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />\n
>> </head>\n
>> <body>\n
>> <div class="progname">Perl Diver 2.33</div>
>> <table bgcolor="black" border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table bgcolor="white" cellspacing="0" cellpadding="1" width="100
>> %"><tr><th class="a1">Main</th> <th class="a2"><a href="perldiver.pl?action=20">Environment Variables</a></th> <th class="a3"><a href="perldiver.pl?act
>> ion=30">Perl Default Values</a></th> <th class="a1"><a href="perldiver.pl?action=40">Perl Config - Summary</a></th> <th class="a2"><a href="perldiver.p
>> l?action=50">Perl Config - Full</a></th> <th class="a3"><a href="perldiver.pl?action=60">Installed Modules</a></th> <th class="a1"><a href="perldiver.p
>> l?action=65">List Directory</a></th> <th class="a2"><a href="perldiver.pl?action=66">uptime</a></th> <th class="a3"><a href="perldiver.pl?action=2000">
>> Docs</a></th></tr></table></td></tr></table><p /><table bgcolor="black" border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table bgcolor=
>> "white" cellspacing="0" cellpadding="1" width="100%"><tr class="HL"><th><span class="heading">Main</span></th></tr><tr><td>Basic paths and information<
>> /td></tr></table></td></tr></table><p /><table bgcolor="black" border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table bgcolor="white" c
>> ellspacing="0" cellpadding="1" width="100%"><tr class="a1"><td class="label" valign="top">Perl Executable</td> <td class="value">C:\Perl\bin\perlis.dll
>> </td></tr>\n
>> <tr class="a2"><td class="label" valign="top">Perl version</td> <td class="value">5.008008</td></tr>\n
>> <tr class="a3"><td class="label" valign="top">Operating System Name</td> <td class="value">MSWin32</td></tr>\n
>> <tr class="a1"><td class="label" valign="top">GID (If not blank, you are on a machine that supports membership in multiple groups simultaneously)</td>
>> <td class="value">0</td></tr>\n
>> <tr class="a2"><td class="label" valign="top">Path to Perl</td> <td class="value"></td></tr>\n
>> <tr class="a3"><td class="label" valign="top">Path to sendmail</td> <td class="value"></td></tr>\n
>> <tr class="a1"><td class
>> ="label" valign="top">Directories searched for perl modules</td> <td class="value">C:/websites/barbados.gov.bb/www/agriculture/library/cgi-bin/<br />C:/
>> Perl/site/lib<br />C:/Perl/lib<br />.</td></tr></table></td></tr></table><p /><table bgcolor="black" border="0" cellspacing="0" cellpadding="1" width="
>> 100%"><tr><td><table bgcolor="white" cellspacing="0" cellpadding="1" width="100%"><tr class="HL"><th>Perl Diver brought to you by <a href="http://scrip
>> tsolutions.com">ScriptSolutions.com</a> © 1997- 2007</th></tr></table></td></tr></table>\n
>> </body>\n
>> </html>
>> finished.- Hide quoted text -
>>
>> - Show quoted text -
>
> >> Stay informed about: IIS, PerlIS.dll, and perl scripts. |
|
| Back to top |
|
 |  |
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
 |
|
|