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

Steve Lime steve.lime at dnr.state.mn.us
Tue Apr 29 15:51:50 EDT 2003

My bad. I ran into it last night but didn't remember the other change I
had made. Thanks
Dan for fixing it. BTW I did add initial coding for GD antialiased
drawing last night but never
got to test it do to my stupid update.


>>> Daniel Morissette <morissette at dmsolutions.ca> 04/29/03 11:27AM >>>
I have run into this as well and fixed it in CVS a few minutes ago.  

(It was not specific to PHP MapScript, it was caused by a change made
few days ago to not trim leading spaces in DBF fields, so any attempt
access shapefiles/DBFs to draw a map would have crashed as well.)


Vincent Schut wrote:
> 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
> 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
> fine.
> Anyone can confirm this as a bug?
> simple testcase:
> //test.phpms:
> <?php
> $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->open();
> $oLayer->getShape(-1, 0); // get first feature of shape
> $oLayer->close();
> ?>
> This reproduces the error with me, no matter what mapfile I use.
> Regards,
> --
> ______________________________________
> Vincent Schut (schut at sarvision.com)
> Sarvision B.V.
> Wageningen, The Netherlands
> www.sarvision.com 
Mapserver-dev mailing list
Mapserver-dev at lists.gis.umn.edu 

More information about the mapserver-dev mailing list