Log in

View Full Version : Ssi - Php



tacmig99
09-23-2006, 06:26 PM
I am attempting to use SSI for the first time because iFrames are getting increasingly annoying but I have PHP in my pages.
I have the following server information:

System-wide defined Apache handler
.cgi .pl cgi-script
.php .php5 cgi-php5
.php4 .php3 cgi-php4
.shtml server-parsed
I don't want to use php5 because I have been told it's not backward compatible so I used:

AddHandler cgi-php4 .php
Now the problem I have is with the SSI, when I try to make my .php pages have SSI enabled it changed my AddHandler from cgi-php4 to server-parsed. Is there any way to have both AddHandlers use .php or am I overlooking something?

jscheuer1
09-23-2006, 06:34 PM
I'm not sure about your question, seems doubtful but, I'm no expert in that particular subject. However, I wonder a bit about your reservation in using PHP.

If you use no features that are PHP 5 specific, it will be backward compatible. Additionally, unless you are thinking of porting your code to another server, using PHP 5 is no problem. It is doubtful that your server will ever downgrade its PHP 5 support and server side code depends only upon the server for compatibility, not upon the user.

tacmig99
09-23-2006, 07:14 PM
Ok this helps more than you know, I thought I couldn't use my php scripts if I used the php5 handler, thanks a lot, solved my problems :)

Edit: Well I just tried setting .php to the AddHandler server-parsed and nothing worked lol
So now I'm back to the same question, how do I use SSI in .php pages. The only thing I want to use is this one line of code in a few places.

<!--#include file="yourfilename.txt" -->
Or should I just forget about using SSI and use php includes? What is the difference anyways?

jscheuer1
09-23-2006, 09:26 PM
Well I just tried setting .php to the AddHandler server-parsed

Why would you want to do that?

Twey
09-23-2006, 10:32 PM
Or should I just forget about using SSI and use php includes?Definitely the best course of action.
What is the difference anyways?Effectively, nothing. PHP will do anything SSI can do, and a heck of a lot more too.