[Mapserver-users] msReturnPage(): Web application error. Malformed templatename.

Steve Lime steve.lime@dnr.state.mn.us
Mon, 12 May 2003 13:21:00 -0500


There's a regex someplace that defines file patterns for templates.
Without it people
could change template names to things like /etc/password. That would be
bad. So
that expression needs to be extended to allow .php. Look in map.h or
mapserv.h
for #define statement and recompile. If you file a bug I'll fix this in
the CVS if it hasn't
been fixed already.

Steve

>>> Gardner Lloyd Bickford III <gbickford@netacus.com> 05/12/03 03:47AM
>>>
Hello,
   I have encountered an interesting error. I have created a php module

that acts as a wrapper for the mapserver cgi. This php script simply
passes 
the http query string (everything after the ?) to the mapserver cgi
using 
the file() function in php. It then eval()'s the returned string and 
outputs the result to the browser.
   I created this script so that I could take advantage of the power
that 
the mapserver cgi offers while still being able to use php in my
templates. 
The problem is that when I set the header or footer in my mapfile to a
file 
that ends in .php then I receive the error:
msReturnPage(): Web application error. Malformed template name.
for now I have simply changed the templates names to end in .phtml as
the 
file extension plays no role in how the content is handled in this
case.

This isn't really a question or a bug. It's just an FYI for the
archives as 
I can imagine other people may run into this issue.

Gardner


Gardner Lloyd Bickford III
gbickford@netacus.com   - email
877.811.1279                    - toll free
+34 678 83 28 48                - mobile
http://www.netacus.com  - web 

_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu 
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users