[mapserver-users] PHP MapObj serialization?

Vinko Vrsalovic vinko at cprsig.cl
Tue Jul 30 10:27:18 EDT 2002


On Tue, Jul 30, 2002 at 09:41:26AM -0400, Daniel Morissette wrote:
> Vinko,
> 
> The main reason why you cannot serialize a MapObj in PHP is that it is
> just a set of wrappers on top of MapServer's internal C structures, and
> hte PHP serialization functions cannot do anything about them... so you
> get "invalid handle" errors from the serialized object because the
> internal C structures don't exist any more.
> 
> In the current version, the only way to save the state of a mapObj is to
> use $map->save($temp_filename), store the $temp_filename in your
> $_SESSION, and load the saved mapfile on further requests.
> 
> I don't think serializing mapObj will ever be possible given the nature
> of MapScript, but maybe some tricks can be implemented eventually to
> save the mapfile to a session variable, or even have support for
> persistent mapObj... but that's very far in our priority list.

Exactly as I suspected, thanks for the confirmation, though :-)

-- 
Vinko Vrsalovic <vinko[|- at -|]cprsig.cl>
http://www.cprsig.cl



More information about the mapserver-users mailing list