Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

apache 2.2.8, PHP & SSI

  • 18-03-2008 10:59PM
    #1
    Registered Users, Registered Users 2 Posts: 1,000 ✭✭✭


    I have tried nearly every solution google throws up...but still no luck!
    All of this works in the LIVE environment but not in my local. I have just installed WAMP and am stuck trying to get SSI working.
    • I have an index.php file in the root of the site.
    • I have a header.php in an SSI folder.
    • index.php has a directive: <? include ("/ssi/header.php"); ?>
    • header.php has php code that displays an image depending on the page.
      <?
      if ($PHP_SELF == '/index.php')
      {
      echo ('<img src="/images/banner.gif" width="390" height="157">');
      }
      elseif ($PHP_SELF == '/aboutus.php')............... ?>
    • httpd file has these added:
      Options Indexes Includes FollowSymLinks

      AddType text/html .php
      AddOutputFilter INCLUDES .php
    • One more thing... I have a .htaccess file in the root which rewrites .php to .html


Comments

  • Closed Accounts Posts: 7,144 ✭✭✭DonkeyStyle \o/


    Might be a daft question, but have you got short tags enabled locally? (<? as opposed to <?php)?


  • Registered Users, Registered Users 2 Posts: 9,579 ✭✭✭Webmonkey


    Might be a daft question, but have you got short tags enabled locally? (<? as opposed to <?php)?
    +1 since as I believe PHP5 has them turned off by default


  • Registered Users, Registered Users 2 Posts: 1,000 ✭✭✭MargeS


    Nice one! I'd never in a million years have seen that. I'm new to PHP so have no experience with PHP v4. That fixed the problem, so now I am getting proper errors being logged.
    I'm having a problem changing the (include_path='.;C:\php5\pear') to my own path. But I reckon I can muddle through this. Thanks again.


Advertisement