B
benwylie
I am running IIS 6.0 on Windows 2003.
I would like to be able to run a perl script from a web page and
include the output.
I have tried doing it with an ssi:
<form action='docsearch.shtml' method='get'>
<!--#exec cgi="/cgi-bin/docsearch.pl-->
</form>
This correctly ran the script, but it was unable to include the
QUERY_STRING from the parent URL into the included perl script, and
there seems no work around to enable me to do that on IIS 6.0,
therefore on this thread:
http://groups.google.com/group/microsoft.public.inetserver.iis/browse_thread/thread/76ae0d85395a3d72
I was recommended: "to a simple ASP page which will easily do exactly
what you want because it actually has the functionality you want, by
intention, and is supported."
That is now what I am attempting to do. I found this page:
http://www.wrensoft.com/zoom/support/faq_ssi.html
which recommends using this to run the script:
<%
Dim WshShell, env
Set WshShell = CreateObject("WScript.Shell")
Set env = WshShell.Environment("Process")
env.Item("REQUEST_METHOD") = "GET"
env.Item("QUERY_STRING") = Request.QueryString
set oExec = WshShell.Exec(Server.MapPath("search.cgi"))
oExec.StdOut.ReadLine() ' skip the HTTP header line
Response.Write(oExec.StdOut.ReadAll())
%>
However, when I do this, I get an error message:
WshShell.Exec error '800700c1'
docsearch.pl is not a valid Win32 application.
How can I run a perl script file, ensuring that it receives the
QUERY_STRING from the parent URL and include the output in my asp file?
Thanks
Ben
I would like to be able to run a perl script from a web page and
include the output.
I have tried doing it with an ssi:
<form action='docsearch.shtml' method='get'>
<!--#exec cgi="/cgi-bin/docsearch.pl-->
</form>
This correctly ran the script, but it was unable to include the
QUERY_STRING from the parent URL into the included perl script, and
there seems no work around to enable me to do that on IIS 6.0,
therefore on this thread:
http://groups.google.com/group/microsoft.public.inetserver.iis/browse_thread/thread/76ae0d85395a3d72
I was recommended: "to a simple ASP page which will easily do exactly
what you want because it actually has the functionality you want, by
intention, and is supported."
That is now what I am attempting to do. I found this page:
http://www.wrensoft.com/zoom/support/faq_ssi.html
which recommends using this to run the script:
<%
Dim WshShell, env
Set WshShell = CreateObject("WScript.Shell")
Set env = WshShell.Environment("Process")
env.Item("REQUEST_METHOD") = "GET"
env.Item("QUERY_STRING") = Request.QueryString
set oExec = WshShell.Exec(Server.MapPath("search.cgi"))
oExec.StdOut.ReadLine() ' skip the HTTP header line
Response.Write(oExec.StdOut.ReadAll())
%>
However, when I do this, I get an error message:
WshShell.Exec error '800700c1'
docsearch.pl is not a valid Win32 application.
How can I run a perl script file, ensuring that it receives the
QUERY_STRING from the parent URL and include the output in my asp file?
Thanks
Ben