IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationIIS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old January 26th, 2004, 03:31 AM
Aquanaut Aquanaut is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 3 Aquanaut User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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


Reply With Quote
  #2  
Old January 26th, 2004, 11:17 AM
Aquanaut Aquanaut is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 3 Aquanaut User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Re: SSI on IIS problems

Quote:
Originally posted by Aquanaut
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



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>&nbsp; </p>
</body>
</html>
------------------------------------------------------------------

Amazing what you can find on the web when you look long enough ......

Many Thanks
Jerry


Reply With Quote
  #3  
Old January 26th, 2004, 01:54 PM
Doug G Doug G is online now
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,713 Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 1 m 54 sec
Reputation Power: 688
I'm glad you got it going

Reply With Quote
  #4  
Old January 26th, 2004, 05:57 PM
Aquanaut Aquanaut is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 3 Aquanaut User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationIIS > SSI on IIS problems


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway