[Mapserver-users] php.exe crash with drawQuery

Daniel Morissette morissette at dmsolutions.ca
Mon Jul 28 07:57:22 PDT 2003


Steph,

DrawQuery() works for me in all the tests that I make on both Windows 
and Linux.  I also ran a sequence of Query + DrawQuery() with Valgrind 
(a memory checker) and no errors were reported.

So it must be something specific to your data, mapfile or script.  If 
you can then please file a bug in bugzilla and attach a small 
reproduceable test case (script, mapfile and data).  Otherwise I don't 
think anyone can help without a way to reproduce the problem.

BTW, the reference map marker problem (bug 378) is fixed in the 4.0 CVS.

Daniel


W. Steph wrote:

> Hello again !
> 
> I have a problem with $map->drawQuery() with mapscript 4 : here is my 
> php-mapscript code :
> [$queryzone = ..]
> if ($queryselectmode == "clic")
> {
>  $success=@$qlay->queryByPoint($queryzone,MS_MULTIPLE,-1);
> }
> else
> {
>  $success=@$qlay->queryByRect($queryzone);
> }
> if ($success==MS_SUCCESS)
> {
>  for ($o=0; $o<$qlay->getNumResults(); $o++)
>  {
>    $rcmo = $qlay->getResult($o);
>    $queryresults[$qlay->name][$o] = $rcmo->shapeindex;
>  }
>  $querysucceed=true;
> }
> [...]
> if ($querysucceed)
> {
>  $querymap = $map->drawQuery();
>  $querymapimg = $querymap->SaveWebImage(MS_JPG,1,1,$quality);
> }
> 
> This code makes php.exe crash on the line $querymap = $map->drawQuery(); 
> (with querybypoint _and_ querybyrect) with numerous different test cases.
> But it worked with previous versions...
> I found in the mapServer Wikki that there where MapFiles changes in 4.0, 
> and I saw ITEMQUERY and ITEMNQUERY : I don't have these in my mapfile, 
> and I don't know what they are used for (I found nothing about it in the 
> mapFile reference). Maybe my problem could be solved with this ? Also, I 
> didn't change anything in my mapfiles since I use mapserver 4.0; maybe 
> there are other things to do but I can't understand everything very well 
> on the wikki's migration guide.
> Can somebody help ?
> 
> Thanks a lot
> Steph
> 





More information about the MapServer-users mailing list