httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Freddy Jensen)
Subject [users@httpd] Question about Server Side Includes
Date Tue, 28 Jul 2009 17:41:23 GMT

I am a newcomer to this mailing list. I have had a few
months experience setting up an apache web server on
Redhat Linux EWS 5.

I decided to venture into Server Side Includes which
indeed is a neat feature for doing fairly complex
things easily.

The question I have is:

I have created a csh script which I invoke from my web page
like this:

<!--#exec cmd="/somepath/check_for_debug.csh" -->

The script looks like this:

#!/bin/csh -f
echo '<\!--#set var="MY_DEBUG" value=1 -->'
exit 0

Right after executing the  csh script I have this html code
that tries to check the value of the MY_DEBUG variable and
execute printenv if the value is set to 1:

<!--#if expr="${MY_DEBUG} = 1" -->
<!--#printenv -->
<!--#endif -->

What I don't understand is that it doesn't work. The "if"
expression doesn't see that the MY_DEBUG is set.

If I put the "set var" inline in my webpage before the "if"
expression then it works:

<!--#set var="MY_DEBUG" value=1 -->
<!--#if expr="${MY_DEBUG} = 1" -->
<!--#printenv -->
<!--#endif -->

printenv is executed.

So it looks to me like you canot set server side include variables
from inside a shell script executed with the "exec" comment.

Perhaps I misunderstood something in the way server side includes work?

Help and advise will be  appreciated.


Freddy Jensen, Sr. Computer Scientist, Adobe Systems Incorporated
345 Park Avenue, San Jose, CA 95110-2704, USA, Ph: (408) 536-2869
Email:, URL:

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message