httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roger morgan <rmorgan...@yahoo.com.INVALID>
Subject [users] Server-side include problem in Apache 2.4.9 <--#if expr
Date Wed, 04 Jun 2014 08:11:32 GMT
I'm trying to migrate a website that worked under 2.2. The only change required seems to be
in SSI, because the syntax changed from 2.2 to 2.4. I decided not to use the "SSILegacyExprParser
on" option because that option might go away in the future.

The site has a .shtml file that contained:
<!--#if expr="${ismember}" -->

The first attempt at conversion was to replace this by:
<!--#if expr="%{ismember}" -->

That doesn't work, it displays:
[an error occurred while processing this directive]
on the webpage, and in apache2's error.log file there appears:

 [include:error] [pid 3616] [client 127.0.0.1:39677] AH01337: Could not parse expr "%{ismember}"
in [...]: syntax error, unexpected $end: Variable 'ismember' does not exist

(I've replaced the file path by [...]).
Next, I added the following to the file before the <!--#if :

<!--#set var="ismember" value="something" -->
<!--#echo var="ismember" -->

and tried again.
This time, the line:
something
appeared on the web page. This confirms that SSI is correctly set up and that apache is processing
SSI directives in the file.
Yet otherwise the symptoms are the same. Apache still complains in the error.log file that
the variable 'ismember' does not exist, despite having just successfully echoed its value
to the webpage!

Can anyone see what I am doing wrong? I can't believe that apache2 would get distributed with
such a crude bug. I'm using Apache 2.4.9 on Debian Jessie in case it matters.

Roger

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message