I am trying to use a nested SSI (SSI with a call to another SSI inside it) on my index page, but my index page is a .php file. I think the problem I am running into is that the second SSI is not being parsed due to the page being a php page. Any suggestions? By the way, the nested SSI file works fine on the other .html pages.
We have added SSI to the apache server as a parsable extension, and that is what made the nested SSI's work on the html pages, but it still will not work on the php pages like our index.php page. Thanks!
Nested SSI and PHP index Woes!
Moderator: General Moderators
Similar problem but the other way around
I am migrating to a new server and none of my old PHP SSI do work anymore.
Old config: Plesk 7.5.4 with PHP 4.3.8 running Apache 2.0.50 on Fedora
New Config: Plesk 7.5.4 with PHP 4.3.11 running Apache 2.0.53 on Fedora
Works perfectly on old server: http://www.exactamerica.com/exact/about.html header/footer and right section are all PHP SSI, but on the new server the page will not even display.
I have tried to replace them with SHTML on the new server and it works fine, so SSI is turned on properly. All my PHP pages of the site do work properly and all the PHP SSI on PHP pages work perfectly. Just when I have PHP SSI in .HTML files that it craps out.
I tried a bunch of .htaccess edits but none of them fully satisfied me as they either serve the HTML page with the PHP SSI but then non of the stand alone PHP pages worked anymore.
Some people suggested that I needed:
I have full control over the server (1and1 is my provider of root server) and can set it up as I want but until this new server I never faced that problem.
Since the site is well indexed and ranked by search engine, converting all my pages to PHP is not an option. Changing to SHTML all the includes is not an option either as I have dynamic script in the PHP includes so need a PHP extension.
If you believe you can be of help to solve the problem please let me know.
Cheers,
- Jeremie
Old config: Plesk 7.5.4 with PHP 4.3.8 running Apache 2.0.50 on Fedora
New Config: Plesk 7.5.4 with PHP 4.3.11 running Apache 2.0.53 on Fedora
Code: Select all
The code in question is on an HTML page:
<!--#include virtual="includes/header.php" -->I have tried to replace them with SHTML on the new server and it works fine, so SSI is turned on properly. All my PHP pages of the site do work properly and all the PHP SSI on PHP pages work perfectly. Just when I have PHP SSI in .HTML files that it craps out.
I tried a bunch of .htaccess edits but none of them fully satisfied me as they either serve the HTML page with the PHP SSI but then non of the stand alone PHP pages worked anymore.
Some people suggested that I needed:
But my httpd.conf file is already set that way. My belief is that it can be solved with an edit on the .htaccess but cannot find the good combo of edits to make it all work as before.AddType text/html .shtml
AddHandler server-parsed .html
AddHandler server-parsed .shtml
You need something like this in your httpd.conf file.
I have full control over the server (1and1 is my provider of root server) and can set it up as I want but until this new server I never faced that problem.
Since the site is well indexed and ranked by search engine, converting all my pages to PHP is not an option. Changing to SHTML all the includes is not an option either as I have dynamic script in the PHP includes so need a PHP extension.
If you believe you can be of help to solve the problem please let me know.
Cheers,
- Jeremie