Results 1 to 5 of 5

Thread: Ssi - Php

  1. #1
    Join Date
    Oct 2005
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ssi - Php

    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?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Oct 2005
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.
    Code:
    <!--#include file="yourfilename.txt" -->
    Or should I just forget about using SSI and use php includes? What is the difference anyways?
    Last edited by tacmig99; 09-23-2006 at 07:25 PM.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Well I just tried setting .php to the AddHandler server-parsed
    Why would you want to do that?
    Last edited by jscheuer1; 09-23-2006 at 11:24 PM.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    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.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •