[mapserver-users] php mapscript setFilter and signal Segmentation fault (11)
Vladimir
fl_v at inbox.ru
Thu Feb 13 03:08:17 PST 2014
Hello All. Please help me to understand what's wrong.
php mapscript version 6.4.1
request url:
localhost/script.php?LAYERS=roads&SRS=EPSG%3A3857&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&BBOX=8562963.8568664,5347815.0968664,8567741.1711336,5352592.4111336&WIDTH=500&HEIGHT=500
works in mapfile.map:
FILTER (id in (386,400))
but
does not work in script.php:
$roadsLayer->setFilter("id in (386,400)");
at that no other errors except the string in apache log:
[Thu Feb 13 16:03:33.931054 2014] [core:notice] [pid 716] AH00052: child pid 2626 exit signal Segmentation fault (11)
mapfile.map:
-----------------------
MAP
NAME "WMSRoadrs"
CONFIG "PROJ_LIB" "/usr/lib/proj/"
STATUS ON
WEB
METADATA
wms_title "Roadrs"
wms_abstract "Roadrs"
wms_onlineresource "http://localhost/msscr/script.php"
wms_srs "EPSG:3857"
wms_enable_request "*"
wms_encoding "utf-8"
END # end METADATA
END # end WEB
PROJECTION
"init=epsg:3857"
END # end PROJECTION
LAYER
NAME "roads"
STATUS ON
CONNECTIONTYPE postgis
CONNECTION "user=user password=1 dbname=db host=localhost"
DATA "coor from tab using unique id using srid=3857"
FILTER (id in (386,400))#-----------works
TYPE LINE
CLASS
NAME "дороги"
STYLE
COLOR 255 255 255
WIDTH 10
OUTLINECOLOR 0 0 255
OUTLINEWIDTH 1
END # end STYLE
END # end CLASS
PROJECTION
"init=epsg:3857"
END # end PROJECTION
METADATA
wms_title "Demo1"
wms_abstract "Roads Demo1"
wms_srs "EPSG:3857"
wms_include_items "all"
END # end METADATA
END # end LAYER
END # end MAP
---------------
script.php:
----------------
ini_set('display_errors', E_ALL);
error_reporting(E_ALL);
$request = ms_newOwsrequestObj();
if(!empty($_GET)){
foreach ($_GET as $key => $value) {
$request->setparameter($key, $value);
}
}
ms_ioinstallstdouttobuffer();
$map = ms_newMapobj("mapfile.map");
$roadsLayer = $map->getLayerByName("roads");
$roadsLayer->setFilter("id in (386,400)");//-----------does not work
$map->owsDispatch($request);
$contenttype = ms_iostripstdoutbuffercontenttype();
header('Content-type:'.$contenttype);
ms_iogetStdoutBufferBytes();
ms_ioresethandlers();
----------------
--
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140213/776886fe/attachment.htm>
More information about the MapServer-users
mailing list