Forum Moderators: coopster & phranque

Message Too Old, No Replies

#exec cgi displaying header info on htmo

Newbie

         

Zero

4:42 pm on Dec 18, 2003 (gmt 0)

10+ Year Member



Hope someone can help. I have a NT/2000 server with IIS 5.o and perl 5.8...
the the file has an extentions of **.shtml I've tired it under the root directory and well as outside the root directory.. no luck.

I've used both ssi directives in my webpage with poor results..
<!--#exec cgi="/cgi-bin/textclockt.cgi" -->
works allmost but produces a hearder status line like below.

HTTP/1.1 200 OK Date: Thu, 18 Dec 2003 05:23:47 GMT Server: Microsoft-IIS/5.0 Content-type:text/html

then the time is displayed.. How can i stop the header from being displayed.
=======================================
when I tried to use this ::
<!--#include virtual="/cgi-bin/textclockt.cgi" -->
the entire script is dump into the html... whow can i fix this?
==== script *****************
#!/perl
print "Content-type:text/html\n\n";

use strict;
use POSIX 'strftime';
use CGI 'header';

# Configuration

my $Display_Week_Day = 1;
my $Display_Month = 1;
my $Display_Month_Day = 1;
my $Display_Year = 1;
my $Display_Time = 1;
my $Display_Time_Zone = 1;

# End configuration

my @date_fmt;

push @date_fmt, '%A' if $Display_Week_Day;
push @date_fmt, '%B' if $Display_Month;
push @date_fmt, '%d' if $Display_Month_Day;
push @date_fmt, '%Y' if $Display_Year;
push @date_fmt, '%H:%M:%S' if $Display_Time;
push @date_fmt, '%Z' if $Display_Time_Zone;

print strftime(join(' ', @date_fmt), localtime);

Chico_Loco

5:44 am on Dec 31, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not sure if you still need help, but some servers do not require the content-type line.. hash it out and try it that way.. Or else, try the line with one 1 return "\n", and then another after the use HEADER part?!