[mapserver-users] php mapscript objects in session?

Pietro Giannini pgiannini at bytewise.it
Fri Nov 21 01:13:42 PST 2008


according to my little knowledge, php cannot store an instance of an
object in a session, only primitives variables like strings, integers,
floats and arrays (asp.net instead can).

for your app you must save the context (mapfile path, the extent, the
layers status etc.), and re-instance the map object at each postback.

hth

........................pg



-- 
Pietro Giannini
Bytewise srl - Area GIS
41°50'38.58"N 12°29'13.39"E



On Ven, Novembre 21, 2008 00:33, Christopher Condit wrote:
> Hi-
> I'm using ms4w 2.2.7 and I've run into a problem. Ideally I'd like to
> create the MapScript map object and store it in the session:
>
> $_SESSION['map'] = ms_newMapObj($getMapPath);
>
> This works fine for the that page, for the first call, but when I
> attempt to reference it later I get a PHP error:
> Fatal error: Object has an invalid _handle_ property
>
> Am I missing something here?
>
> Thanks,
> -Chris
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>




More information about the MapServer-users mailing list