#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Posts
    5
    Rep Power
    0
    Can I have PHP and SSI output on the same page?

    If so, what do I need to add to my .htaccess file? I've tried various combinations, but so far I've managed to get only one or the other on my page.

    Any help appreciated.
    Thanks, Diana.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 1999
    Posts
    3
    Rep Power
    0
    If you have Apache Web Server, you may be able to use the virtual() command in PHP to do SSI:

    Exmample:
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    if($banner):
    virtual('/cgi-bin/banner.cgi');
    endif;
    [/code]

    Its the only thing I've ever got to work.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Posts
    5
    Rep Power
    0
    Thanks Dave

    I have, as you suggest, managed to mimic SSI using include and virtual. This is all I need most of the time. I would like to be able to use true SSI sometimes though on a page that also uses PHP. I suspect it's possible by tweaking the .htaccess. If I'm wrong would someone please let me know?
    (And if I'm right, how do I do it?)

    Thanks a lot,
    diana.
  6. #4
  7. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    18
    I'm curious why you want to do this? There isn't anything that you can do using SSI that can't be done in PHP.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 1999
    Location
    Netherlands
    Posts
    77
    Rep Power
    15
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by rod k:
    I'm curious why you want to do this? There isn't anything that you can do using SSI that can't be done in PHP.[/quote]

    Well, I had the same problem. That is, if PHP isn't installed as an Apache module, you can't use the virtual() function.
  10. #6
  11. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    18
    I was referring to non-virtual() type SSI. Re-read the post I was replying to.
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Posts
    5
    Rep Power
    0
    I have a 100-page+ site with lots of includes and scripts with SSI calls. I'm moving to a new server which supports PHP. I would like to add PHP functionality, without having to change everything.
  14. #8
  15. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Posts
    5
    Rep Power
    0
    So now that we've established WHAT I want to do, and WHY I want to do it, does anyone know HOW ?
    :-}
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Posts
    79
    Rep Power
    15
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by diana:
    So now that we've established WHAT I want to do, and WHY I want to do it, does anyone know HOW ?
    :-}
    [/quote]

    Includes can be done in php using the include() function.
    eg <? include ("header.txt") ?>

    What kind of "scripts with SSI calls" do you have?


    Basil

Similar Threads

  1. Apache 1.3.27 on Windows and SSI
    By IceBlix in forum Apache Development
    Replies: 4
    Last Post: April 6th, 2004, 10:58 PM
  2. Replies: 0
    Last Post: January 30th, 2004, 01:22 PM

IMN logo majestic logo threadwatch logo seochat tools logo