Summary - NT Demo Problems with cached querymap

Fawcett, David david.fawcett at moea.state.mn.us
Mon Nov 20 09:43:55 EST 2000


Steve, 

I didn't mean to imply that it was a bug in MapServer.  The true cause is the poor practice of using the space character in directory names.  Unfortunately for Win32 users, Windows does this for you.

Because the issue came up in the Demo, I wanted to document it well, so newer users would understand that it was a problem with their directory naming conventions, and not their map or template syntax.    

David.

David Fawcett
MN Office of Environmental Assistance

> ----------
> From: 	Stephen Lime[SMTP:steve.lime at dnr.state.mn.us]
> Sent: 	Sunday, November 19, 2000 10:17 PM
> To: 	David.Fawcett at state.mn.us
> Cc: 	mapserver-users at lists.gis.umn.edu
> Subject: 	Re: Summary - NT Demo Problems with cached querymap
> 
> Just to clarify. This is NOT directly a MapServer issue. URLs can't contain spaces or any number of special chars. A plus will work for spaces, as will %20. A full set of URL escape sequences can be found at: http://www.netspace.org/users/dwb/url-guide.html among other places.
> 
> Steve
> 
> >>> "Fawcett, David" <David.Fawcett at state.mn.us> 11/19/00 19:39 PM >>>
> In trying to get MapServer up and running on a Win32 machine at home, I installed Apache, ported some basic MapServer applications from UNIX, and installed the latest version of the Demo.  I am running MapServer 3.3.011 on NT/Apache.
> 
> First issue:  When I downloaded the demo, ms_demo.tar.gz from http://mapserver.gis.umn.edu/dload.html, my NT machine trimmed the .gz off of the end of the filename.  When I tried to extract it with WinZip, I got an error.  If this happens to you, just add .gz back to the filename and it should unzip with no problems.
> 
> Second issue:  I set up the demo and an Itemquery example (case 3) from the Test Suite.  Both applications ran on my machine, except that in the Demo, the cached querymap image crashed and in the test suite, the zoomed querymap crashed.
> 
> Thanks to Perry Nacionales, I figured out what the problem is.  MapServer apparently doesn't like any spaces in path names.
> 
> When I installed Apache, I just went with the default path (c:\program files\apache group\apache\) because I knew that I wouldn't be using it as a real Web server.  The best solution is to install your Web server much closer to the root (e.g. c:\apache\).  
> 
> If you need to keep spaces in your path, there are some work arounds.
> 
> In the Demo, the problem shows up in the demo_footer file.  mapserv.exe will take spaces if you replace them with a +.  
> 
> Herein line 7, there are two potential problems.  The first one is the [map] variable.  Even if you replace the spaces in the path set for the map variable in your demo_init file with +, (e.g. <input type="hidden" name="map" value="c:\program+files\apache+group\apache\htdocs\new_demo\demo.map">), when you place [map] in a request as below, it crashes.  To get around this, you could hard code the map path.    
> 
> src="/cgi-bin/mapserv.exe?map=[map]&queryfile=c:\program+files\apache+group\apache\htdocs\new_demo\DEMO[id].qy[get_layers]&mode=map&size=200+200"></td></tr>
> 
> When you set the path for the queryfile, you can replace the spaces with + as done above.  
> 
> David.
> 
> David Fawcett
> MN Office of Environmental Assistance
> 
> 
>   
> 



More information about the mapserver-users mailing list