[mapserver-users] RE: CGI returning a 502 error
Thanks Steve. Looks like I am going to have to figure out how to compile my own binaries. I think I have streamlined the POST parameters as much as I can, unless there is a way to combine the following: &map_layer[layer1]=FEATURE+POINTS+0+0+END+END &map_layer[layer1]_CLASS[0]_STYLE[0]=SYMBOL+ellipse+SIZE+200+COLOR+255+0+0 Lime, Steve D (DNR) wrote: > > Yes, there is a preset limit on the number of parameters the MapServer cgi > will accept and indeed it is 100. There are two ways to work around this. > > 1) Edit the MS_MAX_CGI_PARAMS setting in cgiutil.h and recompile. > 2) Consider combining the requested layers calls into a single variable. > That is: > > Change > ...layer=layer1&layer=layer2&layer=layer3... > to: > ...layers=layer1+layer2+layer3... > > You should see an error message from MapServer in your web server error > log if you ran into this limitation... > > Steve > > -Original Message- > From: mapserver-users-boun...@lists.osgeo.org > [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of stoli > Sent: Tuesday, September 21, 2010 11:19 AM > To: mapserver-users@lists.osgeo.org > Subject: [mapserver-users] RE: CGI returning a 502 error > > > I do not think it is a string length limit. The IIS returns a separate > error > for that. At least it does when you exceed the URL length limit in a GET > request. > > I have been doing some tests and it looks like it might be more of a limit > in the number of parameters in the POST request. I can't find any info > regarding the maximum number of parameters that you can send in one > request > (to an IIS server), but again, I would think that IIS would be responding > with a more specific error if the limit was with it. > > Is it possible that the MapServer CGI is limited to 100 POST parameters? > > Fawcett, David (MPCA) wrote: >> >> According to the docs, starting with MapServer 5.0, there is no limit to >> the number of layers in a mapfile. >> http://mapserver.org/introduction.html#layer-object >> >> I am guessing that you are running into a different issue. >> >> Have you captured the post request string and examined it to make sure >> that it is valid? >> >> Are you running into a string length limit for your post request? The >> URL >> for your post request would be limited to ~2k char for IE, but this only >> includes the URL to the server, not the key:value pairs. There could be >> a >> size limit for post requests set on your Web server to help prevent DOS >> attacks. I don't know where this would be set in IIS. >> >> David. >> >> -Original Message- >> From: mapserver-users-boun...@lists.osgeo.org >> [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of stoli >> Sent: Monday, September 20, 2010 6:18 PM >> To: mapserver-users@lists.osgeo.org >> Subject: [mapserver-users] CGI returning a 502 error >> >> >> I'm using the ms4w binaries (5.6.3) under IIS 7. >> >> My application sends (via http POST) a lot of parameters to modify the >> .map >> file. Mostly to add features to layers that are turned off by default and >> then make them visible. When my parameters cause the map to show over 50 >> layers, the IIS returns a 502 error. >> >> I realize that the max layers are set to 100 in the default map.h file, >> but >> like I said, I am using the compiled binaries from ms4w. Does anyone know >> if >> they change that to 50 when they compile, or should I look elsewhere to >> find >> my problem? >> >> >> -- >> View this message in context: >> http://osgeo-org.1803224.n2.nabble.com/CGI-returning-a-502-error-tp5552675p5552675.html >> Sent from the Mapserver - User mailing list archive at Nabble.com. >> ___ >> mapserver-users mailing list >> mapserver-users@lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> >> >> ___ >> mapserver-users mailing list >> mapserver-users@lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> >> > > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/CGI-returning-a-502-error-tp5552675p339.html > Sent from the Mapserver - User mailing list archive at Nabble.com. > ___ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > ___ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/CGI-returning-a-502-error-tp5552675p5563549.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] RE: CGI returning a 502 error
I do not think it is a string length limit. The IIS returns a separate error for that. At least it does when you exceed the URL length limit in a GET request. I have been doing some tests and it looks like it might be more of a limit in the number of parameters in the POST request. I can't find any info regarding the maximum number of parameters that you can send in one request (to an IIS server), but again, I would think that IIS would be responding with a more specific error if the limit was with it. Is it possible that the MapServer CGI is limited to 100 POST parameters? Fawcett, David (MPCA) wrote: > > According to the docs, starting with MapServer 5.0, there is no limit to > the number of layers in a mapfile. > http://mapserver.org/introduction.html#layer-object > > I am guessing that you are running into a different issue. > > Have you captured the post request string and examined it to make sure > that it is valid? > > Are you running into a string length limit for your post request? The URL > for your post request would be limited to ~2k char for IE, but this only > includes the URL to the server, not the key:value pairs. There could be a > size limit for post requests set on your Web server to help prevent DOS > attacks. I don't know where this would be set in IIS. > > David. > > -Original Message- > From: mapserver-users-boun...@lists.osgeo.org > [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of stoli > Sent: Monday, September 20, 2010 6:18 PM > To: mapserver-users@lists.osgeo.org > Subject: [mapserver-users] CGI returning a 502 error > > > I'm using the ms4w binaries (5.6.3) under IIS 7. > > My application sends (via http POST) a lot of parameters to modify the > .map > file. Mostly to add features to layers that are turned off by default and > then make them visible. When my parameters cause the map to show over 50 > layers, the IIS returns a 502 error. > > I realize that the max layers are set to 100 in the default map.h file, > but > like I said, I am using the compiled binaries from ms4w. Does anyone know > if > they change that to 50 when they compile, or should I look elsewhere to > find > my problem? > > > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/CGI-returning-a-502-error-tp5552675p5552675.html > Sent from the Mapserver - User mailing list archive at Nabble.com. > ___ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > ___ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/CGI-returning-a-502-error-tp5552675p339.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] RE: CGI returning a 502 error
I do not think it is a string length limit. The IIS returns a separate error for that. At least it does when you exceed the URL length limit in a GET request. I have been doing some tests and it looks like it might be more of a limit in the number of parameters in the POST request. I can't find any info regarding the maximum number of parameters that you can send in one request (to an IIS server), but again, I would think that IIS would be responding with a more specific error if the limit was with it. Is it possible that the MapServer CGI is limited to 100 POST parameters? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/CGI-returning-a-502-error-tp5552675p304.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] CGI returning a 502 error
I'm using the ms4w binaries (5.6.3) under IIS 7. My application sends (via http POST) a lot of parameters to modify the .map file. Mostly to add features to layers that are turned off by default and then make them visible. When my parameters cause the map to show over 50 layers, the IIS returns a 502 error. I realize that the max layers are set to 100 in the default map.h file, but like I said, I am using the compiled binaries from ms4w. Does anyone know if they change that to 50 when they compile, or should I look elsewhere to find my problem? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/CGI-returning-a-502-error-tp5552675p5552675.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] RE: Change a SYMBOL param via URL (CGI MapServer)
No apology required. Probably not a feature that is in high demand. Thanks for the response. Now I can move on to my next idea for a work around. Rick -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Change-a-SYMBOL-param-via-URL-CGI-MapServer-tp5522137p5538427.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Change a SYMBOL param via URL (CGI MapServer)
I want to change the POINTS values in a SYMBOL defined in my map file. Can you do this on the fly? i.e. I define the symbol in the map file: MAP . . SYMBOL NAME mySymbol TYPE ELLIPSE POINTS 1 1 END FILLED TRUE END . . END In the URL I have tried both: ...&map_symbol[mySymbol]=POINTS+2+1+END&... and ...&map_symbol[mySymbol]_POINTS=2+1&... Neither results in a parse error, but they don't change the aspect of the ellipse either. Can it be done? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Change-a-SYMBOL-param-via-URL-CGI-MapServer-tp5522137p5522137.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] RE: Dynamically draw different sized ellipses on map
To better understand what I am doing, consider this as an example (perhaps not very realistic, but close enough): Let’s assume you have a site that allows the user to analyze cell phone coverage. Your database has the location of all the towers. Each tower contains various antenna types, each antenna type with a different range. Occasionally, new towers are added to the database, old towers are removed, and antenna types are changed. The user selects the antenna type, submits the request to the server, and the server generates the ellipses that represent each antenna’s coverage. Those ellipses are overlaid on the map and the image is returned to the user. The map image processing is all done server side via cgi requests. Sounds like the best way to do this might be to write out a unique shapefile for each user session. Certain user inputs (like a change in antenna type) will require their shapefile to be updated (rewritten), while other inputs (like zooming, panning, etc.) will not. Thanks again. If anyone knows of a better way to accomplish this, I'm all ears. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Dynamically-draw-different-sized-ellipses-on-map-tp5508425p5514639.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] RE: Dynamically draw different sized ellipses on map
Thanks David. Those are excellent references. I hadn't seen Matt Perry's site before. The Tissot Indicatrix certainly shows the distortion that I need to deal with due to map projection. I think I can work out the geometry of the ellipses. Assuming that the application needs to be capable of rendering up to 100 of these ellipses at varying locations at any given time, would you say the most efficient way to do this is to program the app to dynamically build a shape file and add it as a map layer each time a user requests the page, or create them as symbols (in which case I think I would need a different layer for each ellipse). I suppose I might run into URL length limits with the latter. Is there another possibility that I am missing? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Dynamically-draw-different-sized-ellipses-on-map-tp5508425p5511294.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Dynamically draw different sized ellipses on map
Was hoping on some guidance as to the best way to attack this... My app uses the cgi interface. I have been succesful at drawing lines, squares and small circles on the fly by sending mods to the .map file via the URL. I have been doing this by dynamically adding points to various POINT layers with the afforementioned symbols. Up to this point, the squares and circles have been uniform in size and aspect. Now I find myself needing to add multiple ellipses of varying sizes at different locations on the map. Technically they would be circles of area, but the aspect will change as the location approaches the poles. (almost a true circle at the equator and verly long ellipse toward the poles due to map projection). Ideally the ellipses will be filled with either a hatch pattern or a transparent solid color. Any suggestions as to the best way to accomplish this? Cheers -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Dynamically-draw-different-sized-ellipses-on-map-tp5508425p5508425.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users