PDA

Bekijk Volledige Versie : Strange SSI behaviour



Amer Neely
23/04/06, 05:20
I'm not sure if this is the right group for my problem, so if someone
has a better suggestion please let me know.

I run Apache 2.x under Win2K for development.

Currently I have a set of pages that uses SSI include virtual commands
to embed common content into all the pages. I have a navigation panel
that I want to behave a certain way. When that particular page is being
viewed, I want to change the text link to a different style, as a visual
clue what page is being viewed.

This works perfectly on my system at home, but when uploaded to my host,
I get an error for the external file that is being called in. I have no
idea why it would work at home and not on my host. As far as I can see
I'm not using XSSI commands, just straight SSI. All other included files
work fine.

Here is an example of what the external file does:

<!--#if expr = "'$DOCUMENT_NAME' = 'contact.shtml'"-->
<div style="line-height:2">Contact Us</div>
<!--#else-->
<div style="line-height:2"><a href="contact.shtml">Contact Us</a></div>
<!--#endif -->

What happens is, when each page is loaded, it spits out an error "[an
error occurred while processing this directive]". Visit
http://www.softouch.on.ca/ssi/index.shtml to see what I mean.

If anyone has a clue why this might be happening I would appreciate some
ideas.
--
Amer Neely
Home of Spam Catcher
W: www.softouch.on.ca
E: trudge@softouch.on.ca
Perl | MySQL | CGI programming for all data entry forms.
"We make web sites work!"

Rene Pijlman
23/04/06, 15:20
Amer Neely:
>I'm not sure if this is the right group for my problem,

"nl" is short for Netherlands / Dutch. Try comp.infosystems.www.servers
for help in English.

--
René Pijlman

Amer Neely
23/04/06, 18:40
Rene Pijlman wrote:
> Amer Neely:
>> I'm not sure if this is the right group for my problem,
>
> "nl" is short for Netherlands / Dutch. Try comp.infosystems.www.servers
> for help in English.
>

:) Thanks. I figured that after viewing a few postings. Maybe an Apache
group would help too.

--
Amer Neely
Home of Spam Catcher
W: www.softouch.on.ca
E: trudge@softouch.on.ca
Perl | MySQL | CGI programming for all data entry forms.
"We make web sites work!"

Amer Neely
24/04/06, 16:00
Amer Neely wrote:
> I'm not sure if this is the right group for my problem, so if someone
> has a better suggestion please let me know.
>
> I run Apache 2.x under Win2K for development.
>
> Currently I have a set of pages that uses SSI include virtual commands
> to embed common content into all the pages. I have a navigation panel
> that I want to behave a certain way. When that particular page is being
> viewed, I want to change the text link to a different style, as a visual
> clue what page is being viewed.
>
> This works perfectly on my system at home, but when uploaded to my host,
> I get an error for the external file that is being called in. I have no
> idea why it would work at home and not on my host. As far as I can see
> I'm not using XSSI commands, just straight SSI. All other included files
> work fine.
>
> Here is an example of what the external file does:
>
> <!--#if expr = "'$DOCUMENT_NAME' = 'contact.shtml'"-->
> <div style="line-height:2">Contact Us</div>
> <!--#else-->
> <div style="line-height:2"><a href="contact.shtml">Contact
> Us</a></div>
> <!--#endif -->
>
> What happens is, when each page is loaded, it spits out an error "[an
> error occurred while processing this directive]". Visit
> http://www.softouch.on.ca/ssi/index.shtml to see what I mean.
>
> If anyone has a clue why this might be happening I would appreciate some
> ideas.

The problem was that I no space after an 'else' command and the trailing
'-->'.

--
Amer Neely
Home of Spam Catcher
W: www.softouch.on.ca
E: trudge@softouch.on.ca
Perl | MySQL | CGI programming for all data entry forms.
"We make web sites work!"