<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body bgcolor="#FFFFFF" fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Definitely not something done in MapServer proper. However, I thought with Apache you could do some process chaining/filtering. You might look at the various Apache modules (mod_filter
 is one) and see if there's anything there.
<div><br>
</div>
<div>Steve<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px"><br>
<hr tabindex="-1">
<div id="divRpF844779" style="direction: ltr; "><font face="Tahoma" size="2" color="#000000"><b>From:</b> mapserver-users-bounces@lists.osgeo.org [mapserver-users-bounces@lists.osgeo.org] on behalf of Brent Fraser [bfraser@geoanalytic.com]<br>
<b>Sent:</b> Friday, October 05, 2012 9:15 PM<br>
<b>To:</b> Bistrais, Bob<br>
<b>Cc:</b> mapserver-users@lists.osgeo.org<br>
<b>Subject:</b> Re: [mapserver-users] Echo PHP in a query template?<br>
</font><br>
</div>
<div></div>
<div>
<div class="moz-cite-prefix">Bob,<br>
Not as coded.  The template file is read by mapserver, it then makes text substitutions (eg "[username]") , and sends the result to std out.  Then the web server sends it to the browser.  The web server does not do any interpreting of the PHP in this case.<br>
<br>
What  did you want to do?<br>
<pre class="moz-signature" cols="72">Best Regards,
Brent Fraser</pre>
On 10/5/2012 1:32 PM, Bistrais, Bob wrote:<br>
</div>
<blockquote type="cite"><style>
<!--
@font-face
        {font-family:Wingdings}
@font-face
        {font-family:Wingdings}
@font-face
        {font-family:Calibri}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
span.EmailStyle17
        {font-family:"Calibri","sans-serif";
        color:windowtext}
.MsoChpDefault
        {font-family:"Calibri","sans-serif"}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
-->
</style>
<div class="WordSection1">
<p class="MsoNormal">I am customizing a MapServer query template.  I’d like to echo back some PHP  code in the HTML template.  But the process seems to ignore the PHP part.  Here’s a code example:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><!-- MapServer Template --></p>
<p class="MsoNormal"><?</p>
<p class="MsoNormal">$test = "php test!";                         <span style="font-family:Wingdings">
ß</span>--Set PHP variable</p>
<p class="MsoNormal">?></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><table></p>
<p class="MsoNormal"><td align="left"><b>Your Name:</b></td></tr></p>
<p class="MsoNormal"><tr></p>
<p class="MsoNormal"><td><input type="text" id="username" value="[username]"/></td></p>
<p class="MsoNormal"></tr></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><h3><? echo "test" ?></h3>                      <span style="font-family:Wingdings">
ß</span>-Call PHP variable</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"></table></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">-The PHP echo displays nothing</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Is there a way to get this to work?</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Thanks,</p>
<p class="MsoNormal">Bob Bistrais, GISP</p>
<p class="MsoNormal">Maine Office of Geographic Information Systems</p>
</div>
<br>
<fieldset class="mimeAttachmentHeader" target="_blank"></fieldset> <br>
<pre>_______________________________________________
mapserver-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</pre>
</blockquote>
<br>
</div>
</div>
</div>
</div>
</body>
</html>