Question about Server Side Includes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Thanks

--
Freddy Jensen, Sr. Computer Scientist, Adobe Systems Incorporated
345 Park Avenue, San Jose, CA 95110-2704, USA, Ph: (408) 536-2869
Email: jensen@xxxxxxxxx, URL: http://www.adobe.com
--


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux