• GoDaddy Community
  • VPS & Dedicated Servers
  • VPS & Dedicated Servers

    cancel
    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 
    Go to solution
    New

    SSI (server side include) stopped working

    I have a problem. 

    Yesterday, the SSI stopped working on my site.

     

    Snippet (worked for years):

    <!--#include virtual="header.html" -->
    

    Now generates an error:

    [an error occurred while processing this directive]

     

    I've tried to use PHP include, which is completely ignored by the server:

     

    <?php include 'header.html';?>

     

    and

    <!-- #include file="header.html" -->

     

    I've tried to edit the 'htaccess' to include SSI for the different file extensions:

     

     

    AddHandler server-parsed .html
    AddHandler server-parsed .shtml
    AddHandler server-parsed .htm

     

    nothing works.

    And it's just happened Yesterday. 

     

     

    5 REPLIES 5
    Anonymous
    Not applicable

    Re: SSI (server side include) stopped working

    Hi @jama,

     

    You say that:

    <?php include 'header.html';?>

    is completely ignored by the server? It most likely will be unless the file it's in has a '.php' extension. This tells the server to 'look out for' some PHP code................. that's NOT the file it refers to of course.  

    New

    Re: SSI (server side include) stopped working

    Hi @Anonymous</a>,

     

    Thanks. It makes sense. 

    I've tried unsuccessfully to modify '.htaccess':

    AddHandler x-httpd-php .html .htm

     

     Is there a best practice to use SSI on Godaddy?

     

    I can try to enable the Apache error log, but they say it takes up to 24 hours to enable.

    And I am not even sure, if it will help.

     

    FYI:

    The page/site works fine on my local ISS server.

    And the "header.html" file contains no code to fail (I've tested with an empty file).

    The error seams to be specific to the line:

    <!--#include virtual="header.html" -->

     

    Here are the links:

    http://waofmusic.com/header.html

    http://waofmusic.com/index.shtml

     

    New
    Solution

    Re: SSI (server side include) stopped working

    Problem is fixed.

     

    it seems that now the absolute path is required in the SSI "include" directive (e.g. "/header.html")

     

    The change fixed the issue:

    Doesn't work anymore:

    <!--#include virtual="header.html" -->

     Works:

    <!--#include virtual="/header.html" -->

     

    Re: SSI (server side include) stopped working

    Hi,

     

           Facing similar problem with SSIs. I am hosting my site here for many years. Until now it was ok. Few days back got a email saying that my public IP has been changed. I guess my hosting server has also been changed if not the server location too. And I found my SSI directives not working anymore on my html pages (more than 80% of my site is html). Called the local tech support in India three times. But they don't seem to understand what SSIs are, some marketing kind of people. They offered all sort of impractical solutions like changing my php version, restoring previous versions from backups, buy dedicated hosting etc. From this post on community platform I found out the root case of the problem i.e. absolute vs relative paths.

     

            I tried on a few pages and its working. But now the problem is I have so many pages with SSI directive at multiple places. Its a tedious job. Also again godaddy may swap servers or IPs the absolute paths may not work there, the publishing directory is chrooted one. Is there some other way out? Something that should make my SSIs more portable in such dynamically changing scenarios. I guess the tech people could have fixed the issue at the server configuration level, but there is no way to approach them except through the 'award winning support' which don't understand what we are talking about.

    Re: SSI (server side include) stopped working

    Gang,

     

    First up - THANK YOU for the hint regarding the absolute path. That fixes the problem. But I'm in the same boat in terms of a TON of pages that have includes. Gads. I'm thinking I'm going to need to do something with my html editor to do a mass change....