SSI and parsing php includes

We have a ProLiant DL360 G4 3.0Ghz with 1Gb RAM, running RHESL-4, Apache 2.0.52 and PHP 4.3.9

A customer wants to run a php script in the footer.html include file. Most of our pages are .shtml as I use SSI on almost all pages, and about 10% are .php.

On the .shtml pages I call the footer
<!--#include virtual="/includes/footer.html" -->
On the php pages I use
<?php require("includes/footer.html"); ?>
Maybe that should be
<?php include("includes/footer.html"); ?>
but it works.

We had problems getting the php code to work in footer.html on the php pages so I renamed it footer.php and got the php code in the footer to work. But the data displayed by the php code in footer.html on the shtml pages is duplicated. We can't work out why.


Does anyone have any suggestion please. We thought about changing
AddHandler server-parsed .shtml
to
AddHandler server-parsed .shtml .php
but that broke a lot of pages with php code.

Bob

 

 

 

 

Top