PHP/Mapscript 4.8.3 crash

Bart van den Eijnden (OSGIS) bartvde at XS4ALL.NL
Fri Apr 7 07:03:44 EDT 2006


Hi list,

I am getting a crash of php on Windows when trying to set the template 
of a class after processQueryTemplate has been called.

If I leave out the processQueryTemplate call the line which sets the 
class template does not crash.

Is anybody able to confirm this behaviour? Am I trying something 
"illegal"? Btw the code comes from Chameleon's MapTips widget.

<?php

dl('php_mapscript_48.dll');

$oMap = ms_newmapobj(dirname(__FILE__)."/test.map");
$oLayer = $oMap->getLayerByName('werkzaamheden');

@$oLayer->queryByRect( $oMap->extent );
$szCoords = $oMap->processQueryTemplate( array(), false );

for ($i=0; $i<$oLayer->numclasses; $i++)
{
  $oClass = $oLayer->getClass( $i );
  // crashes here if processQueryTemplate is called before
  $oClass->set( "template", 'blank.html' );
}

?>

Best regards,
Bart

-- 
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl



More information about the mapserver-dev mailing list