MapTools.org

[maplab-users] Limited length to layer connection string?

Mike Leahy mgleahy@fes.uwaterloo.ca
Tue, 11 Nov 2003 17:53:28 -0500
Daniel,

It seems you are correct.  I have been saving the map files in temporary
files for debugging purposes.  I wrote the following script to try out the
mapfile with the long query string:

	$oRefMap=ms_newMapObj('d:/tmp/session.map');
	$oImage = $oRefMap->draw();
	echo $oImage->saveWebImage;

The same error happens.  I'm using MapScript 4.1 with the Mapserver that
comes with it from the DM Solutions download site.

If it is a postgis driver problem, then is that something potentially
fixable?

Here's another issue:  Even though I can work around this problem by
creating views, and using those for the layer data sources, the time it
takes to generate the map is ridiculously long (like more than 5 minutes) -
and generally the script terminates before it gets very far.  However, I
found that if I create a temporary table instead of a view using "select
<vars> into <temp_table> from ...", and then use the temporary table as data
source, the length of time to create the map is actually not too bad (maybe
20 seconds including the time it takes to create the temporary table).  Is
this some unavoidable issue related to the use of queries rather than tables
as the source for data?  I'd rather not be constantly creating/dropping
tables if I can avoid it, but for now it seems to be the best approach.

I appreciate your help...

Mike

-----Original Message-----
From: maplab-users-admin@lists.maptools.org
[mailto:maplab-users-admin@lists.maptools.org] On Behalf Of Daniel
Morissette
Sent: November 11, 2003 2:19 PM
To: Mike Leahy
Cc: maplab-users@lists.maptools.org
Subject: Re: [maplab-users] Limited length to layer connection string?

Mike Leahy wrote:
> 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.
> 

There is always a possibility that there would be a buffer overflow in 
the postgis driver.  Can you try saving the mapfile just before drawing 
the map, at the point where it contains the full POSTGIS data string, 
then check that the mapfile contains exactly the same data string that 
you expect.

If the mapfile looks OK then try a little 5-liner script that just loads 
that mapfile and draws it.  If the little script fails as well then the 
problem is almost for sure in the postgis driver and we'll need a way to 
reproduce this to be able to go further.  BTW which version of 
MapServer/MapScript are you using?

-- 
------------------------------------------------------------
  Daniel Morissette               morissette@dmsolutions.ca
  DM Solutions Group              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.