PHP MapScript queries

Daniel Morissette morissette at dmsolutions.ca
Tue Feb 6 13:50:44 EST 2001


Thorsten,

I'm not sure if this is related to your problem or not, but you need to
have a QUERYITEM and a QUERY object in your layer definition for your
layer to be queryable.

However, I'm still concerned by the seg. fault and would like to be able
to track it... if you're using a recent version of MapServer (less than
a month old) and still get the seg. fault, then perhaps you could zip
your PHP script and data and send it to me and I'll see if I can
reproduce the crash.

Daniel


Thorsten Fischer wrote:
> 
> Ladies and gentlemen,
> 
> I am trying to do a query on a map. The result is a segmentation fault in the
> mapserver. Please show where to look for errors, maybe in my compiled mapserver.
> 
> I got a map file with a valid extent and a single layer:
> 
> name mmplz
> status on
> size 600 600
> symbolset "symbols/newsym.sym"
> extent <enter valid values here>
> units meters
> shapepath "data"
> imagecolor 255 255 255
> 
> layer
>  name leger
>  type polygon
>  status on
>  data plz
>  classitem "plz5"
>  class
>   symbol 2
>   outlinecolor 0 0 0
>   color 255 255 255
>   end
> end
> 
> In php I write:
> 
> $map = ms_newMapObj ("raderg.map");
> $mylayer = $map -> getLayerByName ("leger");
> 
> which works fine. Then:
> 
> $qres = $mylayer -> queryUsingRect ($rect);
> 
> where $rect is a valid rectangle -- segfault.
> 
> MapServer was configured as follows:
> 
> ./configure --with-apxs=/usr/sbin/apxs --with-tiff=/usr --with-jpeg
> --with-eppl --with-ttf --without-gif --with-gd=/opt/GIS --with-proj=/opt/GIS
> --with-php=/home/frosch/src/GIS/mapserver/php-4.0.3pl1
> 
> php was configured as follows:
> 
> ./configure --prefix=/usr/lib/apache --without-ttf --disable-debug
> --with-mysql --enable-calendar --enable-dbase --without-zlib
> --with-regex=system --with-gd=/opt/GIS --with-apxs=/usr/sbin/apxs
> 
> Thanks in advance,
> 
> Thorsten
> 
> --
> 
> Thorsten Fischer          thfischer at mapmedia.de
> 
> ---------------------------------------------------------
> MapMedia - Kartographie und raumbezogene Informationssysteme
> Am Borsigturm 42
> 13507 Berlin
> Deutschland
> http://www.mapmedia.de tel: +49 (0)30 43032102
> ---------------------------------------------------------

-- 
------------------------------------------------------------
 Daniel Morissette                morissette at dmsolutions.ca
                 http://www.dmsolutions.ca/
------------------------------------------------------------
  Don't put for tomorrow what you can do today, because if 
      you enjoy it today you can do it again tomorrow.




More information about the mapserver-users mailing list