Skip navigation
Currently Being Moderated

Poriblems with Server Side Include

Sep 1, 2012 2:00 PM

Tags: #php #ssi

I amtrying to convert to Spry Menus using SSI. into a template.  been beating my head against the wall on what can go in and what can't in an include fil but that turns out not be my big problem

 

 

when in using Dredamweaver CS5   and  do a server side I have major issues at the differeent levels

 

i have the file in a directory off the site root called  Includes

 

the file i am trying to include

 

using a page at the root level my statement using document relation is

 

<!--#include file="Includes/Navbar.html" -->

 

works fine   channg to site relation does not work   Ok so far so good

 

however a page in a lower level director gets the dreaded

 

[an error occurred while processing this directive]

 

and i get an error

 

[

[Sat Sep 01 16:51:42 2012] [error] [client 174.57.220.98] unable to include file "../Includes/Navbar.html" in parsed file /usr/local/www/kasdivi.com/blog/beachguide.html

 

and also

 

Warning - PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525-debug/memcache.so' - Cannot open &quot;/usr/local/lib/php/20100525-debug/memcache.so&quot;

Unknown(0) : Warning - PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525-debug/apc.so' - Cannot open &quot;/usr/local/lib/php/20100525-debug/apc.so&quot;

Unknown(0) : Warning - PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525-debug/pdf.so' - Cannot open &quot;/usr/local/lib/php/20100525-debug/pdf.so&quot;

Unknown(0) : Warning - PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525-debug/memcache.so' - Cannot open &quot;/usr/local/lib/php/20100525-debug/memcache.so&quot;

Unknown(0) : Warning - PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525-debug/apc.so' - Cannot open &quot;/usr/local/lib/php/20100525-debug/apc.so&quot;

Unknown(0) : Warning - PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525-debug/pdf.so' - Cannot open &quot;/usr/local/lib/php/20100525-debug/pdf.so&quot;

 

 

 

the php errors don't seem mahor although they seem to have i have another iisue or are the related

 

but that aside

 

If I move the include file to the same level as the pade with approprirate include statement no problem it works

 

if i move it to a subditrectory  then it doesn't work

 

 

summary

 

i can get SSI to work for page on the root level using Includes from a subdirectory

 

but on other level I must have the include in the same directory with the page

 

any thoughts??

 
Replies
  • Currently Being Moderated
    Sep 1, 2012 2:32 PM   in reply to captcurrent

    Your menu links are inside an include file.  There should be nothing else inside that file except the list tags, classes & hyperlinks.  Links are relative to the parent page(s) in which they will occur.

     

    All supporting scripts and CSS go inside the parent page -- in your case, the Template.dwt file.

     

    Local Files Panel:

         -Includes

              menu.html

              footer.html

         +Styles

         +SpryAssets

         -Templates

              main.dwt

         about.shtml

         contact.shtml

         index.shtml

         services.shtml

     

    Problems will occur if you use document relative link paths with pages that are located inside sub and sub-sub folders. Obviously, you want to avoid doing that.  For best results, keep all your site pages at root level.

     

    Hope this helps,

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 1, 2012 3:39 PM   in reply to captcurrent

    You can still use SSIs.  Read this Help article.

    Absolute, document-relative, and site root-relative paths

    http://help.adobe.com/en_US/dreamweaver/cs/using/WScbb6b82af5544594822 510a94ae8d65-7c44a.html

     

     

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 2, 2012 4:49 AM   in reply to captcurrent

    Root relative will work just fine.  No need to use absolute....

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 2, 2012 5:26 AM   in reply to captcurrent

    If they didn't work, then you must not have implemented them properly.  They do work, and they will work in this circumstance.  The reason one would want to use root relative links rather than absolute links is that DW can manage the former, but not the latter, so if you ever change a file name or move a file within DW I believe that there will be problems with absolute links (although I haven't tested this).

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 2, 2012 5:36 AM   in reply to captcurrent

    Can you show what you tried that did not work?

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 2, 2012 7:20 AM   in reply to captcurrent

    Of course, when a link to an include file works, then I cannot see what the link looks like.  When it does not work, it's replaced by an error message, and once again, I cannot see what the link looks like -

     

    <div id= "nav">

    [an error occurred while processing this directive]

    </div>

     

    But I see what the problem is.  You are making the link to the include file root relative.  That's not the right approach.  Make that link document relative.  DW will manage those links just fine.  It's the links WITHIN the file being included that must be root relative.  So -

     

    your second file linked above should have this -

     

    <div id= "nav">

    <!--#include file="Includes/Navbar.html" -->

    </div>

     

    (I'm assuming you have set your server to parse all document extensions so that the include directives are found and executed)

     

    ALL of the links within the files being included should be root relative (I can see that MOST but not all of them are).

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 2, 2012 9:05 AM   in reply to captcurrent

    Your site definition for the Remote site must be adjusted to show kasdivi.com as the root folder.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 2, 2012 10:19 AM   in reply to captcurrent

    This change should have no impact on those other attributes.

     
    |
    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