Problem with enabling SSI on Mac OS X 10.5.6

Discussion in 'Web Design and Development' started by happyjohn, Jan 24, 2009.

  1. happyjohn macrumors newbie

    Jan 24, 2009
    hello everyone,

    please really need your help. The problem is simple - my SSI code, which I implemented into the .html file doesn't work. I put this line:

    <!--#include file="LoginForm.shtml" -->
    where LoginForm.shtml is a file in the same directory.

    I've also read that I need to turn on the SSI in the httpd.conf file. So I think I did that. Here is what I did:

    1. Added "Includes" into the Option line - both in the <Directory/> and in the <Directory "/Library/WebServer/Documents">

    2. Uncommented 2 lines "AddType text/html .shtml" and "AddOutputFilter INCLUDES .shtml"

    So I thought after that everything would work just fine. However it wasn't happened :) I then read lots of stuff in the net which was very different from one to another resource, I've read the Apache official documentation - everything was right, but nothing worked. I then added in the in the <Directory "/Library/WebServer/Documents"> 2 lines - "AddType text/html .shtml" and "AddHandler server-parsed .shtml".

    Nothing works though. Please help me to solve this issue. Dunno what to do else.

    My config - Apache 2.2 running on Mac OS X 10.5.6, MySQL 5, PHP 5

    Any help would be highly appreciated!!!

    P.S. Here's my httpd.conf file.

    Attached Files:

  2. angelwatt Moderator emeritus


    Aug 16, 2005
    I'll start with a possible simple solution. After making the changes to the httpd.conf file, did you restart the web server? That's a required step.

    Also, what is the current results? Essentially, how do you know it's not working?

    Edit: Oh, do you have that #include state inside a file with a .html extension? That would be an issue. It needs the shtml extension to be parsed.
  3. happyjohn thread starter macrumors newbie

    Jan 24, 2009
    Oh my God!!!!

    I was really crazy!!! Thanks mate you've put me into the solution lol!!! Of course I restart Apache after I made every change in my httpd.conf file, though I didn't see such a obvious thing like file extension. The #include statement was in usual .html file, because I thought I need to use .shtml at those files, which would be included, but not in main one. I'll try to check it now! :) Though something is whispering me it should work!

    Thanks angelwatt!

Share This Page