|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
SSI on IIS problems
I'm running several sites with much the same content and I want to run this script to place common things in each site according to the URL of the website, I was getting the Win32 error cant execute.
It seemed not to like the './'cgi-bin/blah blah in the path. But now its seems to find the script but doesn't do anything with it - no output. I have enabled the SSICmd bit in the registry which MS suggest and set permissions on the site to execute scripts. I have spent hours going over Microsoft Links and others that I found - You sorta get to the stage where it all glazes over - Dohhhhh. perl scripts execute on IIS, when called directly but not when called from the html, shich has a .shtml suffix. If I do the include command, it does put all the script code in the html output I have set the folders in the server to enable script execution.. I can't think of much else to do Active Perl 5.8 - Win2K Server SP4+, IIS5+ -----------------------shtml file---------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <p>Perl call - test page.</p> <p>now<br> <!--#exec cgi="cgi-bin/testtags.pl"--> <p>after <p> </p> </body> </html> --------------------Perl script------------- #!/usr/bin/perl # # $siteurl = "$ENV{'HTTP_HOST'}"; print "Hello World! $siteurl"; print "<br>"; Pretty simple - yet???????????? And it all works on a commercial linux webserver - why not IIS? Any thoughts appreciated. Regards Jerry ![]() |
|
#2
|
|||
|
|||
|
Re: SSI on IIS problems
Quote:
Ok - sorted, I think Microsoft Knowledge Base Articale 318176 (eeeeeek!) print "Content-type: text/html\n\n"; has to be returned to the IIS by the exec'd script/program for the output to be printed.... Sheesh - talk about hiding stuff in the depths..... Together with an absolute path from root in the html script made it work. --------------------------perl--------------------------- #!/usr/bin/perl # # print "Content-type: text/html\n\n"; $siteurl = "$ENV{'HTTP_HOST'}"; print "Hello World! - My url: $siteurl"; print "<br>"; ------------------------shtml---------------------------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <p>Perl call - test page.</p> <p>now<br> <!--#exec cgi="/testtags.pl"--> <p>after <p> </p> </body> </html> ------------------------------------------------------------------ Amazing what you can find on the web when you look long enough ...... Many Thanks Jerry ![]() |
|
#3
|
|||
|
|||
|
I'm glad you got it going
![]() |
|
#4
|
|||
|
|||
|
Ummm - not quite - file paths??
Some of the webs are on a Linux server and lots are on a Windows IIS server.
To call the perl script on the Linux system I have to use <!--#exec cgi="cgi-bin/testtags.pl"--> or <!--#exec cgi="./cgi-bin/testtags.pl"--> and <!--#exec cgi="/cgi-bin/testtags.pl"--> Will not work. On the windows IIS I "have" to call the perl script with <!--#exec cgi="/cgi-bin/testtags.pl"--> a relative path within the website will not work. Any ideas how I get this down to one single path definition? Ideas appreciated Regards Jerry |
![]() |
| Viewing: Dev Shed Forums > System Administration > IIS > SSI on IIS problems |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|