[mapserver-users] serializing mapobject with php (FWD)

Thomas E. Burk teb at mallit.fr.umn.edu
Wed Apr 24 09:13:34 EDT 2002


------------- Begin Forwarded Message -------------

From: "Vincent Jansen" <vincent.jansen at javel.nl>
To: <mapserver-info at lists.gis.umn.edu>
Subject: serializing mapobject with php
Date: Wed, 24 Apr 2002 10:53:53 +0200
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600

Hi,

I've been trying to store a complete mapObject in the session vars in php.
Every time I try to perform a task on the unserialized object I get

Fatal error: Object has an invalid _handle_ property in ....

Also a complete serialized mapObject of 40 layers looks something like the
stuff you see below, while one serialized layerObject allready looks like

O:5:"layer":33:{s:8:"_handle_";i:0;s:12:"_map_handle_";i:0;s:10:"numclasses"
;i:1;s:5:"index";i:39;s:6:"status";i:2;s:9:"classitem";s:0:"";s:4:"name";s:1
2:"wegen_totaal";s:5:"group";s:0:"";s:4:"data";s:12:"wegen_totaal";s:4:"type
";i:1;s:9:"tolerance";d:3;s:14:"toleranceunits";i:6;s:11:"symbolscale";d:-1;
s:8:"minscale";d:-1;s:8:"maxscale";d:1000;s:13:"labelminscale";d:-1;s:13:"la
belmaxscale";d:-1;s:11:"maxfeatures";i:-1;s:7:"offsite";i:-1;s:9:"transform"
;i:1;s:10:"labelcache";i:1;s:14:"postlabelcache";i:0;s:9:"labelitem";s:0:"";
s:13:"labelsizeitem";s:0:"";s:14:"labelangleitem";s:0:"";s:8:"tileitem";s:8:
"location";s:9:"tileindex";s:0:"";s:6:"header";s:0:"";s:6:"footer";s:0:"";s:
10:"connection";s:0:"";s:14:"connectiontype";i:1;s:10:"filteritem";s:0:"";s:
8:"template";s:0:"";}

Seems like something's going wrong.

I use mapserver 3.5 an PHP 4.0.6 and hope someone can help me.

Thanks

Vincent Jansen

Javel BV
Westvest 47-53
2611 AZ  Delft
The Netherlands
Phone:  +31 (0)15 2128234
vincent.jansen at javel.nl
http://www.javel.nl


******************************
* Begin serialized mapObject *
******************************

O:3:"map":22:{s:8:"_handle_";i:0;s:9:"numlayers";i:40;s:4:"name";s:5:"zwaan"
;s:6:"status";i:1;s:5:"width";i:612;s:6:"height";i:512;s:11:"transparent";i:
0;s:9:"interlace";i:1;s:6:"extent";O:4:"rect":5:{s:8:"_handle_";i:0;s:4:"min
x";d:81331.2785;s:4:"miny";d:440492.5836;s:4:"maxx";d:88460.0667;s:4:"maxy";
d:450525.049;}s:8:"cellsize";d:0;s:5:"units";i:3;s:5:"scale";d:-1;s:9:"shape
path";s:25:"/gisdata/shapes/delft";s:8:"keysizex";i:20;s:8:"keysizey";i:10;s
:11:"keyspacingx";i:5;s:11:"keyspacingy";i:5;s:10:"imagecolor";O:5:"color":4
:{s:8:"_handle_";i:0;s:3:"red";i:255;s:5:"green";i:255;s:4:"blue";i:255;}s:3
:"web";O:3:"web":14:{s:8:"_handle_";i:0;s:3:"log";s:0:"";s:9:"imagepath";s:7
5:"/local/slash/apache/vhosts/zwaan.demo.javel.nl/httpdocs/include/images/";
s:8:"template";s:0:"";s:8:"imageurl";s:16:"/include/images/";s:6:"header";s:
0:"";s:6:"footer";s:0:"";s:5:"empty";s:0:"";s:5:"error";s:0:"";s:11:"mintemp
late";s:0:"";s:11:"maxtemplate";s:0:"";s:8:"minscale";d:200;s:8:"maxscale";d
:50000;s:6:"extent";O:4:"rect":5:{s:8:"_handle_";i:0;s:4:"minx";d:-1;s:4:"mi
ny";d:-1;s:4:"maxx";d:-1;s:4:"maxy";d:-1;}}s:9:"reference";O:9:"reference":8
:{s:8:"_handle_";i:0;s:5:"image";s:78:"/local/slash/apache/vhosts/zwaan.demo
.javel.nl/httpdocs/images/minimap.gif";s:5:"width";i:140;s:6:"height";i:190;
s:6:"status";i:1;s:6:"extent";O:4:"rect":5:{s:8:"_handle_";i:0;s:4:"minx";d:
82085;s:4:"miny";d:441889;s:4:"maxx";d:88012;s:4:"maxy";d:449852;}s:5:"color
";O:5:"color":4:{s:8:"_handle_";i:0;s:3:"red";i:-1;s:5:"green";i:-1;s:4:"blu
e";i:-1;}s:12:"outlinecolor";O:5:"color":4:{s:8:"_handle_";i:0;s:3:"red";i:0
;s:5:"green";i:0;s:4:"blue";i:0;}}s:8:"scalebar";O:8:"scalebar":16:{s:8:"_ha
ndle_";i:0;s:6:"height";i:3;s:5:"width";i:200;s:5:"style";i:0;s:9:"intervals
";i:4;s:5:"color";i:2;s:15:"backgroundcolor";i:1;s:12:"outlinecolor";i:-1;s:
5:"units";i:2;s:6:"status";i:0;s:8:"position";i:3;s:11:"transparent";i:0;s:9
:"interlace";i:1;s:14:"postlabelcache";i:0;s:5:"label";O:5:"label":28:{s:8:"
_handle_";i:0;s:4:"font";s:0:"";s:4:"type";i:1;s:5:"color";i:2;s:12:"outline
color";i:-1;s:11:"shadowcolor";i:-1;s:11:"shadowsizex";i:1;s:11:"shadowsizey
";i:1;s:15:"backgroundcolor";i:-1;s:21:"backgroundshadowcolor";i:-1;s:21:"ba
ckgroundshadowsizex";i:1;s:21:"backgroundshadowsizey";i:1;s:4:"size";i:2;s:7
:"minsize";i:4;s:7:"maxsize";i:256;s:8:"position";i:0;s:7:"offsetx";i:0;s:7:
"offsety";i:0;s:5:"angle";d:0;s:9:"autoangle";i:0;s:6:"buffer";i:0;s:9:"anti
alias";i:-1;s:4:"wrap";i:0;s:14:"minfeaturesize";i:-1;s:18:"autominfeaturesi
ze";i:0;s:11:"mindistance";i:-1;s:8:"partials";i:1;s:5:"force";i:0;}s:10:"im
agecolor";O:5:"color":4:{s:8:"_handle_";i:0;s:3:"red";i:255;s:5:"green";i:25
5;s:4:"blue";i:255;}}s:6:"legend";O:6:"legend":15:{s:8:"_handle_";i:0;s:6:"h
eight";i:0;s:5:"width";i:0;s:8:"keysizex";i:20;s:8:"keysizey";i:10;s:11:"key
spacingx";i:5;s:11:"keyspacingy";i:5;s:12:"outlinecolor";i:-1;s:6:"status";i
:0;s:8:"position";i:3;s:11:"transparent";i:0;s:9:"interlace";i:1;s:14:"postl
abelcache";i:0;s:5:"label";O:5:"label":28:{s:8:"_handle_";i:0;s:4:"font";s:0
:"";s:4:"type";i:1;s:5:"color";i:1;s:12:"outlinecolor";i:-1;s:11:"shadowcolo
r";i:-1;s:11:"shadowsizex";i:1;s:11:"shadowsizey";i:1;s:15:"backgroundcolor"
;i:-1;s:21:"backgroundshadowcolor";i:-1;s:21:"backgroundshadowsizex";i:1;s:2
1:"backgroundshadowsizey";i:1;s:4:"size";i:2;s:7:"minsize";i:4;s:7:"maxsize"
;i:256;s:8:"position";i:8;s:7:"offsetx";i:0;s:7:"offsety";i:0;s:5:"angle";d:
0;s:9:"autoangle";i:0;s:6:"buffer";i:0;s:9:"antialias";i:-1;s:4:"wrap";i:0;s
:14:"minfeaturesize";i:-1;s:18:"autominfeaturesize";i:0;s:11:"mindistance";i
:-1;s:8:"partials";i:1;s:5:"force";i:0;}s:10:"imagecolor";O:5:"color":4:{s:8
:"_handle_";i:0;s:3:"red";i:255;s:5:"green";i:255;s:4:"blue";i:255;}}}


------------- End Forwarded Message -------------





More information about the mapserver-users mailing list