From: Ben Bacarisse on
Will Kemp <Will(a)xxxx.Swaggie.net> writes:

> On Sat, 19 Apr 2008 22:27:37 +0100, Martin Liddle wrote:
>
>> A subdirectory below the document root has the .shtml file and the
>> critical line is (I think):
>>
>> <!--#include virtual="./errors.txt" -->
>>
>> errors.txt is present and readable. What am I doing wrong or how do I
>> get some debugging information?
>
> Looking back at your original post...
>
> Have you tried replacing "./" (which seems completely pointless!) with
> the full path to the errors.txt file?

It is probably worth pointing out that "full path" in this context
does not mean the Linux full path. The "virtual" SSI takes a URL
relative to the document being served (hence there being no real point
to the "./") but it can be the full path from server's document root.

> And, on another tack, have you tried renaming errors.txt to errors.shtml
> (and changing the name in the mail file, of course)???
>
> I don't think your httpd.conf is configured to accept includes in .txt
> files, is it?

I don't think the SSI is in a .txt file. The OP says: "the .shtml
file" and then shows the key line with the SSI directive.

--
Ben.
From: Will Kemp on
On Tue, 22 Apr 2008 18:50:00 +0100, Ben Bacarisse wrote:

> Will Kemp <Will(a)xxxx.Swaggie.net> writes:
>
>> On Sat, 19 Apr 2008 22:27:37 +0100, Martin Liddle wrote:
>>
>>> A subdirectory below the document root has the .shtml file and the
>>> critical line is (I think):
>>>
>>> <!--#include virtual="./errors.txt" -->
>>>
>>> errors.txt is present and readable. What am I doing wrong or how do I
>>> get some debugging information?
>>
>> Looking back at your original post...
>>
>> Have you tried replacing "./" (which seems completely pointless!) with
>> the full path to the errors.txt file?
>
> It is probably worth pointing out that "full path" in this context does
> not mean the Linux full path. The "virtual" SSI takes a URL relative to
> the document being served (hence there being no real point to the "./")
> but it can be the full path from server's document root.
>
>> And, on another tack, have you tried renaming errors.txt to
>> errors.shtml (and changing the name in the mail file, of course)???
>>
>> I don't think your httpd.conf is configured to accept includes in .txt
>> files, is it?
>
> I don't think the SSI is in a .txt file. The OP says: "the .shtml file"
> and then shows the key line with the SSI directive.

What the OP actually said was:

>>> A subdirectory below the document root has the .shtml file and the
>>> critical line is (I think):
>>>
>>> <!--#include virtual="./errors.txt" -->

In other words, the .shtml file has a line in it that's trying to include
a .txt file.

That won't work unless httpd.conf configured to allow SSI in .txt files -
which it isn't by default. I believe apache will ignore any attempt to
include a file whose filetype isn't explicitly permitted for SSI.


--
http://SnapAndScribble.com/will

From: Martin Liddle on
OK, I have fixed it. I was reasonably happy the httpd.conf looked OK
but I went back to a default; made a couple of edits and suddenly
everything was working.

I am very grateful for all the assistance and whilst I have wasted an
enormous amount of my time on this, I have learnt several things from
the suggestions made. Thank you to all concerned. Now on to the next
problem.
--
Martin Liddle, Tynemouth Computer Services, 3 Kentmere Way,
Staveley, Chesterfield, Derbyshire, S43 3TW.
Web site: <http://www.tynecomp.co.uk>.
From: Ben Bacarisse on
Will Kemp <Will(a)xxxx.Swaggie.net> writes:

> What the OP actually said was:
>
>>>> A subdirectory below the document root has the .shtml file and the
>>>> critical line is (I think):
>>>>
>>>> <!--#include virtual="./errors.txt" -->
>
> In other words, the .shtml file has a line in it that's trying to include
> a .txt file.

Yup.

> That won't work unless httpd.conf configured to allow SSI in .txt files -
> which it isn't by default. I believe apache will ignore any attempt to
> include a file whose filetype isn't explicitly permitted for SSI.

That seems backwards to me. To test, I duplicated the #include to include
errors.html errors.jpg and errors.qwertyuiop in the hope of hitting a
"not permitted" file type. All were included. Obviously that could
just mean I have some "all permitted" option turned on.

Can you point me to the config option I need to change so I can test
this out? The only SSI-related options I can find are the ones that
control what files are scanned for SSI (the AddOutputFilter
INCLUDES directives). On my setup, only .shtml and .html are scanned
for SSIs.

--
Ben.
From: Will Kemp on
On Wed, 23 Apr 2008 14:17:26 +0100, Ben Bacarisse wrote:

> Can you point me to the config option I need to change so I can test
> this out?

No. It looks like i'm wrong about it! ;-)

> The only SSI-related options I can find are the ones that
> control what files are scanned for SSI (the AddOutputFilter INCLUDES
> directives). On my setup, only .shtml and .html are scanned for SSIs.

Yeah, that's probably what i was confusing it with. I had an idea that
i'd had a problem with apache not including files with a .txt prefix -
and i may well have done, but that was on a FreeBSD system where i don't
have access to httpd.conf. I should have checked it before i posted the
message, i guess. But, well, i didn't... No harm done though! :-)


--
http://SnapAndScribble.com/will