Skip navigation
Streetwitch
Currently Being Moderated

Problem with server side includes

Apr 9, 2012 8:48 AM

Hi - I have a page with two php includes which no longer display properly. They were fine when I set them up, and I haven't changed anything.  They don't display online - and also don't display on my local server (Apache).  I have identical code on other sites which does display properly, both on my server and online.  There's nothing wrong with the file paths as they display correctly on the DW display screen, and also on live display, so I'm completely baffled.

Can anyone shed any light?

Here's a sample page - http://www.lucidinsight.com/travelprev.shtml

The includes should both be displaying on the right side of the page (hence the two error messages)

 

Thanks!

 
Replies
  • Currently Being Moderated
    Apr 9, 2012 10:21 AM   in reply to Streetwitch

    That's an shtml page so it won't process any PHP code. You either need to change it to a php page, or change to regular includes rather than php includes.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 9, 2012 10:32 AM   in reply to bregent

    Well spotted bregent!

     

    I'm intrigued to know what a "regular include" is?  I know that there are flavors other than PHP but is a PHP include non-regular?

     

    Martin

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 9, 2012 10:45 AM   in reply to martcol

    What I meant by 'regular' is that the include is processed by the web server, not the scripting engine.

     

    http://en.wikipedia.org/wiki/Server_Side_Includes

     
    |
    Mark as:
  • Jim Carpenter
    509 posts
    Apr 6, 2006
    Currently Being Moderated
    Apr 11, 2012 5:27 AM   in reply to Streetwitch

    Is this hosted on the same servers that works? If I save a file as .shtml with php scripts, it will not process them on one of my servers. The other is classic asp so I can't test it there. But on the one the has php, the ssi do not get processed, but I don't get an error. I would create a simple SSI and use the <!--#include virtual="/assets/includes/testssi.shtml" --> on a test page and see if that works. Easy way to test what bregent said.

     

    Jim

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points