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:
  #1  
Old August 29th, 2004, 07:41 AM
eChris eChris is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 2 eChris User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
CGI Server Side Includes - IIS6 config. Perlis.dll

Hi everyone, usually I find everything I need to know just from browsing the other great posts here, but I've been tearing my hair out with this so I am very hopeful you can help.

My config is:

Win2k3, IIS6 with ActivePerl 5.8
.pl and .cgi are mapped to perlis.dll GET, HEAD, POST
.shtml is mapped to ssinc.dll GET, POST

Perl works great! But calling a .pl or .cgi as an SSI is giving problems:

This tag

<!--#include virtual="/cgi-bin/path/script.pl?info=action" -->

doesn't interpret the file e.g. http://mytreo.net/test.shtml

and the following tag

<!--#exec cgi="/cgi-bin/path/script.pl?info=action" -->

interprets the file correctly, but adds a header to the output e.g. http://mytreo.net/test1.shtml The header it adds is:

"HTTP/1.1 200 OK Date: Sun, 29 Aug 2004 12:42:32 GMT Server: Microsoft-IIS/6.0 Content-type: text/html;CHARSET=ISO-8859-1"

How can I remove this header information? Or, how do I configure the server to process CGI scripts correctly as SSI's? Please help!

Many thanks
Chris N

Reply With Quote
  #2  
Old August 30th, 2004, 11:35 AM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,829 Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 20 h 23 m 12 sec
Reputation Power: 765
I don't know the answer for you. www.iisfaq.com has a lot of helpful information about cgi
__________________
======
Doug G
======
"Hide, hide witch! The good folk come to burn thee. Their keen enjoyment hid behind their gothic mask of duty." -Mark Clifton

Reply With Quote
  #3  
Old November 5th, 2004, 01:15 AM
kepiarn kepiarn is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 3 kepiarn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
<!--#exec cgi="../../.pl"-->

Hi Chris,
Just wanted to know whether you've find the fix on your problem in using
<!--#exec cgi="/cgi-bin/path/script.pl?info=action" -->
For my case is a bit worse than you cause this line does nothing at all(treated like a comment).
hope to have some light from you so I can also get out from this mess .
thanks
edwin_me69@yahoo.com
Quote:
Originally Posted by eChris
Hi everyone, usually I find everything I need to know just from browsing the other great posts here, but I've been tearing my hair out with this so I am very hopeful you can help.

My config is:

Win2k3, IIS6 with ActivePerl 5.8
.pl and .cgi are mapped to perlis.dll GET, HEAD, POST
.shtml is mapped to ssinc.dll GET, POST

Perl works great! But calling a .pl or .cgi as an SSI is giving problems:

This tag

<!--#include virtual="/cgi-bin/path/script.pl?info=action" -->

doesn't interpret the file e.g. http://mytreo.net/test.shtml

and the following tag

<!--#exec cgi="/cgi-bin/path/script.pl?info=action" -->

interprets the file correctly, but adds a header to the output e.g. http://mytreo.net/test1.shtml The header it adds is:

"HTTP/1.1 200 OK Date: Sun, 29 Aug 2004 12:42:32 GMT Server: Microsoft-IIS/6.0 Content-type: text/html;CHARSET=ISO-8859-1"

How can I remove this header information? Or, how do I configure the server to process CGI scripts correctly as SSI's? Please help!

Many thanks
Chris N

Reply With Quote
  #4  
Old December 1st, 2004, 01:09 AM
coexer coexer is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 1 coexer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
The answer to this is not obvious. This happened to me about 2 years ago under IIS5. It took me days to find how to solve the headers problem.

So, the solution is to map perl extensions (.cgi, .pl, etc) to /path/to/perl.exe "%s" %s where path/to/perl is the path to your bin directory. Example: c:\Perl\bin\perl.exe "%s" %s

Off course, by doing this, you will sacrifice the speed load of your scripts as perl for isapi (perlis component) loads once and your scripts load faster than when you use perl.exe (which is executed everytime you load a script).

Hope this helps

Reply With Quote
  #5  
Old January 31st, 2005, 10:43 AM
robbiebow robbiebow is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 1 robbiebow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 17 sec
Reputation Power: 0
If you find this problem continues, but does not occur all the time, the cause may lie with IIS6. This Microsoft Hotfix may be of interest:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;884764

Reply With Quote
  #6  
Old June 10th, 2005, 03:06 PM
DasNoc's Avatar
DasNoc DasNoc is offline
Less lines = More Happiness
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Cary, NC
Posts: 238 DasNoc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 28 m 19 sec
Reputation Power: 5
Send a message via ICQ to DasNoc Send a message via AIM to DasNoc
Has anyone found the solution to removing the headers while using PerlIS?
__________________
DasNoc

Reply With Quote
  #7  
Old June 16th, 2005, 10:35 PM
devilboy836 devilboy836 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 61 devilboy836 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 1 m 34 sec
Reputation Power: 5
Send a message via ICQ to devilboy836 Send a message via AIM to devilboy836 Send a message via MSN to devilboy836 Send a message via Yahoo to devilboy836
I too am looking for help on a related issue. I am looking for almost the exact same thing, using
Code:
<!--#include virtual="/cgi-bin/path/script.pl?info=action" -->
instead of the exec command, but instead I want to use PHP instead of Perl.

Here is what I am trying to accomplish: I have a PHP calendar script that I wrote myself, and based on a GET or POSTed value, the month changes. The script alone works great, but I need to throw it in to a .shtm file so I can add the site's navigation around it. I have realized that I cannot use the Front Page web navigation bars in a PHP file.

Again, the exec will load the script, but I have no access to the environmental variables the scripts posts.

I got this to work fine in Apache by adding two lines to the htaccess file:
AddType text/html .shtm
AddHandler server-parsed .shtm


Any ideas?

Reply With Quote
  #8  
Old June 16th, 2005, 10:48 PM
devilboy836 devilboy836 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 61 devilboy836 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 1 m 34 sec
Reputation Power: 5
Send a message via ICQ to devilboy836 Send a message via AIM to devilboy836 Send a message via MSN to devilboy836 Send a message via Yahoo to devilboy836
Exclamation

Actually, I just got something working, but I know it isn't the "right" way to do things. Recognizing the fact that .shtm files are "parsed" by front page to insert the navigation links and other dynamic content, I changed the server mapping for .shtm files from the SSI dll to the PHP executable. Now not only are the pages being recognized by FrontPage and inserting the navigation bar at the appropriate place, but the sever will parse them as a PHP files.

If I should not be doing this, and a better method should be used instead, someone please post so! But for now, it works!

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationIIS > CGI Server Side Includes - IIS6 config. Perlis.dll


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 3 hosted by Hostway