|
||||
[maplab-users] Limited length to layer connection string?Mike Leahy mgleahy@fes.uwaterloo.caMon, 10 Nov 2003 20:51:13 -0500
|
Paul, I'm pretty sure it's not to do with forms. The thing is, the data string is stored in the PHP session variable not a form, and it is added to the Map object when my map viewer (a modification of a GMapFactory project) is loaded. I've had the problem with forms having too much data to work with the GET method - all that happened for me in that case is that the form wouldn't submit. The error in this case happens with the PHP processor itself when it uses the MapScript map object with a query string beyond a particular length...I can't say exactly when it dies, but I'll make a guess that it's either when I set the data string for the layer object, or when the map is actually drawn. I tested out a workaround by creating views when a map is displayed - that worked fine. It's just making the whole thing that much slower because every time the map object is created, the views are being created then deleted in the database. Thanks for the help, Mike -----Original Message----- From: maplab-users-admin@lists.maptools.org [mailto:maplab-users-admin@lists.maptools.org] On Behalf Of Paul Spencer Sent: November 10, 2003 9:59 AM To: Mike Leahy Cc: maplab-users@lists.maptools.org Subject: Re: [maplab-users] Limited length to layer connection string? Mike, are you using MapLab to create the map file? Or a GmapFactory application to view the map file? If you are using MapLab, one possibility may be that the form in which all the information is being displayed/editted is using the GET method for sending information to the server. If this is the case, then it is possible with IE and posssibly other browsers to easily exceed the length of the allowed URL. If this is indeed the case, then you may be able to correct it yourself by editting the factory.php file and searching for <FORM. I just checked a recent development version and it seems to be using POST, so perhaps this is not the problem. Cheers, Paul Mike Leahy wrote: > Hello list, > > I've run into a bit of trouble with my work today... I'm using MapServer/PHP- > Mapscript, with our data in PostgreSQL/PostGIS on a WinXP/IIS platform. So > far everything has been working fine. I have modified a map-project generated > using MapLab to load map settings from information stored in PHP session > variables rather than a static map file. > > The lastest of my work has focused on developing a web interface to allow > users to evaluate education quality vs. social well-being with options to > specify weights and preferences for various indicators, and then display those > indicators as attributes of a spatial data layer. Basically, I end up with > quite lengthy query strings. When I try to run the map viewer I'll get an > error report from Windows saying the "PHP Script Interpreter has encoutered a > problem and needs to close", etc... The final result in the web page is "The > specified CGI application misbehaved by not returning a complete set of HTTP > headers. The headers it did return are:". Not much to go on there...and for > the longest time I thought it was the complexity of the formulas. I > eventually figured out from playing around with it before emailing the list > that it was simply the length of the query string itself. > > I've got a workaround for this...I just create a view in postgresql with the > gis table joined to the indicators, but I don't like this approach, as I may > end up with the database littered with views for which I'll have to find some > way of cleaning up...has anyone else run into this problem? Does anyone know > if there is a solution and/or is there a possiblity of getting the PHP- > MapScript DLL fixed for this? > > The following is an example of a query that works fine; sig_provincias is a > GIS table with provinces, being joined to a query with a sample formula using > a variable from the table tbl_ind_provincias: > > the_geom from (select sig_provincias.oid, sig_provincias.the_geom, > sig_provincias.nomb_prov, indicators.* from sig_provincias left join (select > cod_provincia, (case when pob_edu_p > 0 then 1 else 1 end) as test_indicator > from tbl_ind_provincias) as indicators on codigo_pro = cod_provincia where > codigo_pro = '1502' or codigo_pro = '1503' or codigo_pro = '1504' or > codigo_pro = '1505' or codigo_pro = '1506' or codigo_pro = '1507' or > codigo_pro = '1508' or codigo_pro = '1501' or codigo_pro = '1509') as tbl1 > using unique oid using srid=4326; > > This next one is the same query, but with an additional province code added to > the where clause...this one will cause the error I mention above... > > the_geom from (select sig_provincias.oid, sig_provincias.the_geom, > sig_provincias.nomb_prov, indicators.* from sig_provincias left join (select > cod_provincia, (case when pob_edu_p > 0 then 1 else 1 end) as test_indicator > from tbl_ind_provincias) as indicators on codigo_pro = cod_provincia where > codigo_pro = '1502' or codigo_pro = '1503' or codigo_pro = '1504' or > codigo_pro = '1505' or codigo_pro = '1506' or codigo_pro = '1507' or > codigo_pro = '1508' or codigo_pro = '1501' or codigo_pro = '1509' or > codigo_pro = '1510') as tbl1 using unique oid using srid=4326; > > Many thanks for your help. > > Kind regards, > Mike > > ---------------------------------------- > This mail sent through www.mywaterloo.ca > _______________________________________________ > Maplab-users mailing list > Maplab-users@lists.maptools.org > http://lists.maptools.org/mailman/listinfo/maplab-users > -- ----------------------------------------------------------------- |Paul Spencer spencer@dmsolutions.ca | |-----------------------------------------------------------------| |Applications & Software Development | |DM Solutions Group Inc http://www.dmsolutions.ca/| ----------------------------------------------------------------- _______________________________________________ Maplab-users mailing list Maplab-users@lists.maptools.org http://lists.maptools.org/mailman/listinfo/maplab-users
This archive was generated by Pipermail. |
MapTools.org -- Hosted by DM Solutions Group |