Is your server using the latest version of Apache?
After personal experience, check to make sure that the version of
Apache you are working with is 1.2 or later. Version 1.2 added
the commands that are beyond the original NCSA SSI's, known as
XSSI's. These extensions include flow control commands like #If,
#elseif, and #endif.
Have you formed the HTML comment correctly?
View the page in you browser of choice. If the commands that you
have in the page are showing up in your rendered HTML page, then
you need to recheck to make sure that you have "<!--" at the
start of your command, and "-->" at the end.
Have you formed the SSI command correctly?
In "CGI Programming on the World Wide Web" by Shishir Gundavaram
and published by O'Reilly, on
the very last page of chapter 5, two common errors are pointed
out:
- First, You should not forget the '#' sign:
- <!--echo var="REMOTE_USER" -->
- Second, do not add extra spaces between the "-" sign and the
"#" character:
- <!-- #echo var="REMOTE_USER" -->
- If you make either of these two mistakes, the server will not
give you an error; rather it will treat the whole expression as
an HTML comment.
It's also a good idea to add a space just before the end of
the command like so: " -->"
Remember: if your command is formed right and your
server is configured correctly, then the actual XSSI command will
NOT show up in either the rendered HTML or the "View Source"
output from your browser's rendering of the page.
Are your commands and variables spelled correctly?
I've caught myself doing this far too many times. Go over your
command letter by letter, making sure that it's spelled correctly
and that quotation marks are in the right place.
Are you accessing the URL correctly?
On some versions of Apache (and maybe other servers), if you have
a URL that points to a file, but ends in a slash (/), the page will
display, but the SSIs will break. This can occur when editing
<A HREF>s by hand: "http://www.foo.com/bar.html/"
Any other suggestions?
If you're still stuck, then you problably have a problem with what
you are expecting the command to do. Remember this is like trouble
shooting anything in the world: break it down to the simplest
pieces, and find out _exactly_ the line that causing you problems.