PHP-MapScript Memory Exhaustion Error

Tim Schaub tim at COMMENSPACE.ORG
Fri Jul 8 20:21:49 EDT 2005


>Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate
>75 bytes) in /var/www/html/foo.phtml

If you can't get around the memory limitation (and you don't want to go
to python as suggested on #mapserver), could you generate a graphic on
the fly to represent your bars?

I've done this with success to create pie charts for points - using the
GD-Library from PHP to create the graphics (doing a queryByRect with the
map extent to work only with points in the map), then adding a new
symbol to the map for each graphic, creating a class for each point id
in the map, and finally adding a style to each class that refers to the
appropriate graphic.

The limitation here is on the number of symbols that you can have per
map (64).  But at least you can point to mapserver instead of PHP on
that one (or recompile with a higher limit).

Tim

(The Transportation > Commute Type layer on
http://public.commenspace.org/sustainable_seattle/mapserver/demographic-
map.php is an example.  I can send a code sample if it would be useful.)



More information about the mapserver-users mailing list