Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

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 October 18th, 2000, 02:08 PM
NBAustin NBAustin is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 6 NBAustin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I'm having a problem with calling scripts via SSI.
EVERY cgi script I call via SSI puts out this text at the top:

HTTP/1.1 200 OK Date: Wed, 18 Oct 2000 18:48:41 GMT Server: Microsoft-IIS/5.0 Content-type: text/html

How do I get rid of this?

I'm running on Windows 2000 and IIS5.

Thanks in advance!

Reply With Quote
  #2  
Old October 19th, 2000, 05:46 AM
chinnavi
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
NBAustin,
You may have following problems.
For SSI Scripts.....You dont have to print HTTP headers and all..
You have to print based on your requirement as simple print statements.

Following is a valid Perl SSI Script:

#!cerlbin

#
#Define a Hash here....
$src = $hash{'day'};
print "<IMG src=$src>";

It is Sufficient ...
No Need to put header...and all...


vijay

Reply With Quote
  #3  
Old October 19th, 2000, 12:23 PM
NBAustin NBAustin is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 6 NBAustin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
The script I'm calling into an HTML page is being called using the exec command. It will not run without the header info.

Please advise.

Reply With Quote
  #4  
Old July 5th, 2001, 08:34 AM
nimr0d nimr0d is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Location: Netherlands
Posts: 7 nimr0d User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Angry

Hi, I am experiencing the same problem.

I Get:

HTTP/1.0 200 OK Date: Thu, 05 Jul 2001 13:32:27 GMT Server: Microsoft-IIS/5.0 Content-type: text/html 4353

On a Win2K server with IIS5.0, PerlIIS.dll

On another IIS server (WinNT, IIS5.0, Perl.exe) I don't get this.

I am beginning to get desperate.

Reply With Quote
  #5  
Old July 5th, 2001, 09:34 AM
NBAustin NBAustin is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 6 NBAustin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Remove this line from the script:

#print "HTTP/1.0 200 OK\n";

Reply With Quote
  #6  
Old July 6th, 2001, 02:09 AM
nimr0d nimr0d is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Location: Netherlands
Posts: 7 nimr0d User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
That's the problem, I don't have that line. Maybe I should try include it.

Reply With Quote
  #7  
Old July 7th, 2001, 02:59 PM
rycamor rycamor is offline
Gödelian monster
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 1999
Location: Pembroke Pines, Florida, USA
Posts: 2,300 rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 3 h 12 m 27 sec
Reputation Power: 56
These problems are not Perl problems, but problems in how a webserver responds to requests. Whenever a webserver gets a request from a web browser, it responds with a set of headers, which tell the requesting agent exactly what type of data it is receiving. These headers are just plain text, looking just like what you posted here, but the browser or user agent strips these headers while processing, and just displays the rest to the user, based on the content/type in receives.

Generally when you include something using SSI, the server is not supposed to put headers in there because it's not getting a request from an HTTP user agent, but from a "user" on the local file system. Obviously, either something is wrong with the server configuration, or the script you are calling outputs the headers explicitly, expecting the receiving agent to be a browser.

"Smart" server-side programming environments like PHP, ASP, emb_perl, etc... automatically deal with these issues, and even allow you to include remote web pages, while automatically stripping the headers, but I believe basic SSI, which is a pretty old method, doesn't automatically do it.

Since we are talking about IIS here (not my favorite), I imagine the problem might be in the order of filtering in the ISAPI filters area, but I really don't have any authoritative answer for you.
__________________
The real n-tier system:

FreeBSD -> PostgreSQL -> [any_language] -> Apache -> Mozilla/XUL

Amazon wishlist -- rycamor (at) gmail.com

Reply With Quote
  #8  
Old July 9th, 2001, 02:05 AM
nimr0d nimr0d is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Location: Netherlands
Posts: 7 nimr0d User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thx, now I know where to look. I dont like IIS myself, but I can host my site here for free.

http://www.LNDonline.org

I noticed that when I included

print "HTTP/1.0 200 OK\n";

There where less headers put out, weird!

- nimr0d

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > SSI Problem


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
Stay green...Green IT