Forum Moderators: phranque

Message Too Old, No Replies

SSI timefmt config being ignored in executable files

         

cschults

6:43 pm on Feb 13, 2008 (gmt 0)

10+ Year Member



I'd like to employ the technique of automatically updating the copyright year in the footer. Something like:

<!--#config timefmt="%Y" -->
Copyright <!--#echo var="DATE_LOCAL" -->

I've discovered that this doesn't work (the timefmt config is ignored) when the file is executable, but we need them to be executable as we're currently using XBitHack under Apache 2.

Correct (file not executable): Copyright 2008

Incorrect (file executable): Copyright Wednesday, 13-Feb-2008 10:25:15 PST

Can anyone confirm and/or suggest a work around?

Thanks,

Chris

jdMorgan

7:08 pm on Feb 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have that exact same code on many pages, with XBitHack full, and both owner and group execute bits set. It works fine. It even works if the code is in an included file within an included file -- i.e. nested includes.

What are the file extensions of the pages where you're using this code?

A work-around might be to set the time format in the including file. That setting should persist when the included file is parsed. This behaviour is usually a bother, but it might be useful in your situation.

Jim

cschults

8:23 pm on Feb 13, 2008 (gmt 0)

10+ Year Member



Hey Jim, thanks for responding. Glad to know it is possible.

The file extension is .inc, and is intended to be used as a footer include file, thus being included by .html and .php pages.

However, I'm experiencing the problem when loading the file directly.

I tried the same code on another server, and it is working, so it must be a configuration issue.