Query template file question
Jim T. Bowen (GAIA Consultants Inc.)
bowenj at gaiaenv.com
Sat Oct 30 08:59:07 PDT 1999
Hello all,
I tried both Brent and Ken's suggestions with limited success...perhaps
I am missing something simple. Here are my findings:
**********************************************************************
*** Brent's suggestion (change the mapserv.ini setting) **************
**********************************************************************
As a simple test, I created a file with no php3 tags, simply straight
html [with a couple of MapServer tags (e.g., [shpminx])] and gave the
file an extension of '.php3'. I changed the mapserv.ini file to reflect
the '.php3' extension for templates. The query worked and MapServer
populated the template with information; however, if I try to redraw the
map, I receive a 'malformed template' error from MapServer. Any
thoughts?
Also, does anyone know if it is possible to include more that one
regular expression per parameter in mapserv.ini? (e.g.,
'TEMPLATE_EXTENSION=\.html$ or TEMPLATE_EXTENSION=\.php3$') I tried
this, but received an error 'received 3 parameters, expecting 2'. FYI,
I also tried 'TEMPLATE_EXTENSION=\.html$ or \.php3$'
**********************************************************************
*** Ken's suggestion (pass args directly to PHP3 via the URL str) ****
**********************************************************************
I attempted to pass the arguments to my php3 page as suggested by Ken.
I noticed I was not double-quoting my path and filename parameter in my
map file. The map file example
(http://mapserver.gis.umn.edu/demo_map.txt) does not indicate
double-quotes are required. It appears the double-quotes are required
only if special characters (e.g., ?, %, etc.) are included in the
parameter (my guess). Changing to double-quoted string permitted the
passing of arguments from MapServer to PHP3 without error. The result
was no 'malformed template' error when drawing the map, but this error
did arise when querying.
**************
*** Other ****
**************
I also tried hybrids of Brent's and Ken's suggestions. Does anyone have
any other ideas surrounding this issue?
If there are no conclusions in the next couple days, I suggest killing
this thread. The 'http-equiv refresh' workaround is not too cumbersome
and it does produce results. Thanks in advance.
Cheers,
Jim
___________________________________ GGG G AAA III AAA
| Jim T. Bowen, M.Sc., President | G GG A I A
| | G G A A I A A
|Suite 306, 822-11th Ave. S.W. | G G A A I A A
|Calgary, Alberta, Canada T2R 0E5 | G A A I A A
|Ph: 403-571-7213 Fax: 403-571-7211| G GGGG A A I A A
|_______bowenj at gaiaenv.com__________| G G AAAAA I AAAAA
ICQ: 15567315 G G A A I A A
http://www.gaiaenv.com G G A A I A A
GGGG AAA AAA III AAA AAA
More information about the MapServer-users
mailing list