i am on Windows Vista Buisiness. Trying to run perl script using IIS 7.0. I have installed and configured perl and IIS too. Added Script mapping for *.cgi and *.pl also.
But when i m trying to run my script it's giving the following error.
pls help me if anyone has the solution.
Thanx in advance.
The error is as follows..
HTTP Error 502.2 - Bad Gateway
Description: The specified CGI application did not return a complete set of HTTP headers.
Can you cut-n-paste the relevant handler entry from your config file? Also, if possible, if you could try the same on vista sp1 beta or ws08 rc - the error message for this error now includes the exact error returned by the cgi app, which can help in troubleshooting
the problem.
Anil Ruia
Software Design Engineer
IIS Core Server
thanx 4 d response. i hv pasted below the content of web.config file which is present inside the virtual directory. hope i have provided u the right thing.
The script-map looks ok - can you try from the command line to cd to the site-root and run the perl-script with c:\Perl\bin\perl.exe "path to perl-script" arguments - and see what output you get in that case - also maybe remove the " surrounding the
script-name in the handler entry - also, as I said, vista sp1/ws08 rc has extra information in the detailed error for this event which will let you see what output IIS actually got from this script.
Anil Ruia
Software Design Engineer
IIS Core Server
What is the text of the error response when hitting the page from localhost? vista sp1/ws08 rtm includes any error response from the CGI in the error response.
Anil Ruia
Software Design Engineer
IIS Core Server
ModuleName="CgiModule", Notification="EXECUTE_REQUEST_HANDLER", HttpStatus="502", HttpReason="Bad Gateway", HttpSubStatus="2", ErrorCode="No more data is available. (0x103)", ConfigExceptionInfo=""
ModuleName="CgiModule", Notification="EXECUTE_REQUEST_HANDLER", HttpStatus="502", HttpReason="Bad Gateway", HttpSubStatus="2", ErrorCode="No more data is available. (0x103)", ConfigExceptionInfo=""
Headers="Use of uninitialized value $fd in pattern match (m//) at C:/Perl/lib/IO/Handle.pm line 352. Use of uninitialized value $fd in concatenation (.) or string at C:/Perl/lib/IO/Handle.pm line 362. C:\SWISH-E\cgi-bin\swish.cgi aborted: open2: Can't call
method "close" on an undefined value at C:/Perl/lib/IPC/Open3.pm line 365. "
Badriprasad
5 Posts
HTTP Error 502.2 - Bad Gateway.... Anybody has the solution
Nov 29, 2007 12:43 PM|LINK
Hi everybody,
i am on Windows Vista Buisiness. Trying to run perl script using IIS 7.0. I have installed and configured perl and IIS too. Added Script mapping for *.cgi and *.pl also.
But when i m trying to run my script it's giving the following error.
pls help me if anyone has the solution.
Thanx in advance.
The error is as follows..
HTTP Error 502.2 - Bad Gateway
Description: The specified CGI application did not return a complete set of HTTP headers.
Error Code: 0x00000103
Notification: ExecuteRequestHandler
Module: CgiModule
Requested URL: http://localhost:80/cgi-bin/script1_oriya.pl
Physical Path: G:\webscripts\script1_oriya.pl
Logon User: Anonymous
Logon Method: Anonymous
Handler: CGI Script Map
Most likely causes:
What you can try:
anilr
2343 Posts
Microsoft
Re: HTTP Error 502.2 - Bad Gateway.... Anybody has the solution
Nov 29, 2007 12:55 PM|LINK
Can you cut-n-paste the relevant handler entry from your config file? Also, if possible, if you could try the same on vista sp1 beta or ws08 rc - the error message for this error now includes the exact error returned by the cgi app, which can help in troubleshooting the problem.
Software Design Engineer
IIS Core Server
Badriprasad
5 Posts
Re: HTTP Error 502.2 - Bad Gateway.... Anybody has the solution
Nov 30, 2007 07:35 AM|LINK
hi anil,
thanx 4 d response. i hv pasted below the content of web.config file which is present inside the virtual directory. hope i have provided u the right thing.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<directoryBrowse enabled="false" />
<handlers accessPolicy="Script, Execute, Read">
<add name="CGI Script Map" path="*.pl" verb="*" modules="CgiModule" scriptProcessor="c:\Perl\bin\perl.exe "%s" %s" resourceType="File" />
<add name="Perl Script Map" path="*.cgi" verb="*" modules="CgiModule" scriptProcessor="c:\Perl\bin\perl.exe "%s" %s" resourceType="File" />
</handlers>
</system.webServer>
</configuration>
Thanx in advance
Badri
anilr
2343 Posts
Microsoft
Re: HTTP Error 502.2 - Bad Gateway.... Anybody has the solution
Dec 03, 2007 06:21 AM|LINK
The script-map looks ok - can you try from the command line to cd to the site-root and run the perl-script with c:\Perl\bin\perl.exe "path to perl-script" arguments - and see what output you get in that case - also maybe remove the " surrounding the script-name in the handler entry - also, as I said, vista sp1/ws08 rc has extra information in the detailed error for this event which will let you see what output IIS actually got from this script.
Software Design Engineer
IIS Core Server
vivesfm
6 Posts
Re: HTTP Error 502.2 - Bad Gateway.... Anybody has the solution
Apr 05, 2008 02:20 AM|LINK
Hi Anilr, I've been following a lot of threads similar to this one but still can't resolve my problem.
I keep receiving the Error 502.2 and I can't figure out why nor I know how to debug it.
Do you have any suggestions?
Below is my config just in case you want to take a look at it.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers accessPolicy="Script, Read">
<add name="CGI Script Map" path="*.pl" verb="*" modules="CgiModule" scriptProcessor="c:\Perl\bin\perl.exe "%s" %s" resourceType="File" />
<add name="Perl Script Map" path="*.cgi" verb="*" modules="CgiModule" scriptProcessor="c:\Perl\bin\perl.exe "%s" %s" resourceType="File" />
</handlers>
</system.webServer>
</configuration>
anilr
2343 Posts
Microsoft
Re: HTTP Error 502.2 - Bad Gateway.... Anybody has the solution
Apr 07, 2008 05:15 PM|LINK
What is the text of the error response when hitting the page from localhost? vista sp1/ws08 rtm includes any error response from the CGI in the error response.
Software Design Engineer
IIS Core Server
vivesfm
6 Posts
Re: HTTP Error 502.2 - Bad Gateway.... Anybody has the solution
Apr 08, 2008 02:53 AM|LINK
Here's what the log says:
IIS Diagnostics Output
IIS Trace Detail Highlights
Warning
IIS Trace Detail
Warning
anilr
2343 Posts
Microsoft
Re: HTTP Error 502.2 - Bad Gateway.... Anybody has the solution
Apr 08, 2008 04:43 PM|LINK
Please see event 70
Software Design Engineer
IIS Core Server
vivesfm
6 Posts
Re: HTTP Error 502.2 - Bad Gateway.... Anybody has the solution
Apr 08, 2008 10:27 PM|LINK
Thanks for your support Anilr, I'd like you to know that the same code that shows that this error on event 70 works just fine on IIS6.
So for now I will go on with IIS6, until I have time for debugging further which is the difference that is causing the problem.
Badriprasad
5 Posts
HTTP Error 502.2 - Bad Gateway.... Anybody has the solution
May 12, 2008 01:40 PM|LINK
hi anil,
i am still having the same problem.
HTTP Error 502.2 - Bad Gateway
Description: The specified CGI application did not return a complete set of HTTP headers.
Error Code: 0x00000103
Notification: ExecuteRequestHandler
Module: CgiModule
Requested URL: http://localhost:80/PerlBin/cgi_prog.pl
Physical Path: G:\MyScripts\cgi_prog.pl
Logon User: Anonymous
Logon Method: Anonymous
Handler: Perl Script Map
Most likely causes:
What you can try:
More Information... This error occurs when the CGI process handling the request exits before it finishes sending the response to IIS.
Server Version Information: Internet Information Services 7.0.
Not yet got any solution for that.
waiting for ur kind response.
thanx in advance.
Badri