Helpful Information
 
 
Category: Perl Programming
SSI Problem

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!

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:

#!c:perlbin

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

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


vijay

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.

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.

Remove this line from the script:

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

That's the problem, I don't have that line. Maybe I should try include it.

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.

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










privacy (GDPR)