Problem getting Server Side Include to work on IBM HTTP Server (Apache Build).

Problem getting Server Side Include to work on IBM HTTP Server (Apache Build).

Post by Teo Keng Boo » Wed, 25 Oct 2000 04:00:00



Hi all,

How do I debug a SSI HTML page? How do I know if my server is executing
mySSI? I have done the following according to the documentation.

1) I have check the httpd.conf file, the following settings are set
accordingly:
# To use server-parsed HTML files
AddType text/html .shtml
AddHandler server-parsed .shtml

2) My SHTML  file (place in /usr/HTTPServer/htdocs) is as follow:
<HTML>
<HEAD>
<TITLE>Date Test</TITLE>
</HEAD>
<BODY>
The date is:
<!--#exec cmd = "date" -->
</BODY>
</HTML>

-- the file has the x-bit set for all groups

With 1) and 2) I still could not get it to work. So a .htaccess file is
place in /usr/HTTPServer/htdocs

3) The content of the .htaccess file is as follows:
<Directory "/usr/HTTPServer/htdocs">
Options +ExecCGI
</Directory>

With 1), 2) and 3) the SHTML still does not work the way I want it to be.
Did I miss out anything in the configurations or code, anybody has similar
experience before? Please help.

------------
More details
------------
The line '<!--#exec cmd = "date" -->' can be seen in the page source, and
there is no error message. "date" is the unix command to display the current
date. Does that implies that the IBM HTTP Server (Apache build) is not
parsing the shtml page at all?

Actually I am trying to insert a dynamic table into a static web page by
using Server Side Include to call a Perl program. The Perl program work fine
on its own, but nothing happens when I call it through SSI. Which is why I
am using the date command to troubleshoot the problem.

Does anyone has the similar problem before?

Actually I also notice that my Perl program does not display image file at
all, even if I have this statement in the Perl program print "Content-type:
text/html\n\n";

Thank you,
Keng Boon

 
 
 

Problem getting Server Side Include to work on IBM HTTP Server (Apache Build).

Post by Mark » Wed, 25 Oct 2000 04:00:00




Quote:> Hi all,

> How do I debug a SSI HTML page? How do I know if my server is
executing
> mySSI? I have done the following according to the documentation.

<snip>

Quote:> ------------
> More details
> ------------
> The line '<!--#exec cmd = "date" -->' can be seen in the page source,
and
> there is no error message.

If you see the line in the source code then your server is not parsing
the page at all.

One thing that gets a lot a people is ambiguous Options directives.
Only the last valid Options directive seem to take effect. Get rid of
all but one if you can, and get rid of the OptionsOverride unless you
are hosting many sites... no .htaccess is necessary then.

Mark

--
Please reply to this newsgroup as my Deja mail
is used as a spam catcher only!

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Problem getting Server Side Include to work on IBM HTTP Server (Apache Build).

Post by adam » Wed, 25 Oct 2000 04:00:00


You will need Options Includes somewhere in there.

-adam


> Hi all,

> How do I debug a SSI HTML page? How do I know if my server is executing
> mySSI? I have done the following according to the documentation.

> 1) I have check the httpd.conf file, the following settings are set
> accordingly:
> # To use server-parsed HTML files
> AddType text/html .shtml
> AddHandler server-parsed .shtml

> 2) My SHTML  file (place in /usr/HTTPServer/htdocs) is as follow:
> <HTML>
> <HEAD>
> <TITLE>Date Test</TITLE>
> </HEAD>
> <BODY>
> The date is:
> <!--#exec cmd = "date" -->
> </BODY>
> </HTML>

> -- the file has the x-bit set for all groups

> With 1) and 2) I still could not get it to work. So a .htaccess file is
> place in /usr/HTTPServer/htdocs

> 3) The content of the .htaccess file is as follows:
> <Directory "/usr/HTTPServer/htdocs">
> Options +ExecCGI
> </Directory>

> With 1), 2) and 3) the SHTML still does not work the way I want it to be.
> Did I miss out anything in the configurations or code, anybody has similar
> experience before? Please help.

> ------------
> More details
> ------------
> The line '<!--#exec cmd = "date" -->' can be seen in the page source, and
> there is no error message. "date" is the unix command to display the current
> date. Does that implies that the IBM HTTP Server (Apache build) is not
> parsing the shtml page at all?

> Actually I am trying to insert a dynamic table into a static web page by
> using Server Side Include to call a Perl program. The Perl program work fine
> on its own, but nothing happens when I call it through SSI. Which is why I
> am using the date command to troubleshoot the problem.

> Does anyone has the similar problem before?

> Actually I also notice that my Perl program does not display image file at
> all, even if I have this statement in the Perl program print "Content-type:
> text/html\n\n";

> Thank you,
> Keng Boon

 
 
 

1. getting server side includes to work with apache server

I've set up my httpd.conf with these additions:

<Directory />
    Options +Includes
    AddType text/html .shtml
    AddHandler server-parsed .shtml
    Options FollowSymLinks
    AllowOverride None
</Directory>

but the .shtml file doesn't process this include statement:

Today is <!--#echo var="DATE_LOCAL" -->

The page loads, but produces this output:

Today is

can someone educate me please ?

2. being hacked?

3. Problem getting server side includes working on Apache

4. "ramdisk=4096" but I get a 16Mb ramdrive?

5. Getting Apache to do server-side includes locally

6. root not able to login

7. Re Getting Apache to do server-side includes locally

8. IDE CDROM Drive problems

9. Apache, Server Side Include: include

10. Apache Server Side Includes Won't Work

11. Apache - Can't get Server Side Includes Working

12. Server Side Include Problems on Unix, Appache Server