[Mapserver-dev] $oLayer->getShape() broken in cvs php_mapscript

Vincent Schut schut at sarvision.com
Tue Apr 29 11:06:02 EDT 2003

Hi all,

I've just cvs-updated mapserver (and updated gd to 2.0.12) and now I get a 
'premature end of script headers' (of php) when I have a 
$oLayer->getShape(-1, $index) in my script. Which I have and pretty much rely 
on to generate classes/color ramps on the fly... This has been introduced 
after updating mapserver (just one hour ago); before that, it just worked. If 
I use a php script without this function (comment it out) everyting works 
Anyone can confirm this as a bug?

simple testcase:

$map_path = "/var/mapserver/mapfiles/"; // change to your mappath
$map_file = "yourmapfile.map"; // change to your testmapfile
$oMap = ms_newMapObj($map_path.$map_file);
$oLayer = $oMap->getLayer(0); // first layer must be shape file
$oLayer->getShape(-1, 0); // get first feature of shape
This reproduces the error with me, no matter what mapfile I use.

Vincent Schut (schut at sarvision.com)
Sarvision B.V.
Wageningen, The Netherlands

More information about the mapserver-dev mailing list