Hello dear developers. Please could you give some direction for decision segfault problem. I tried execute php-script only without mapfile:
$map=ms_newMapObjFromString("MAP NAME \"WMSRoadrs\" STATUS ON CONFIG \"PROJ_LIB\" \"/usr/lib/proj/\" END"); $map->setMetaData("wms_title","Roadrs"); $map->setMetaData("wms_onlineresource"," http://localhost/msscript.php "); $map->setMetaData("wms_srs","EPSG:3857"); $map->setMetaData("wms_enable_request","*"); $map->setMetaData("wms_encoding","utf-8"); ... and result of first call $map->setMetaData is "ignal Segmentation fault (11)" immediately as in my post above Configuration: openSuse 13.1 Mapserver 6.4.1 php 5.4.3 Many Thanks. Четверг, 13 февраля 2014, 15:08 +04:00 от Vladimir <f...@inbox.ru>: > >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 _______________________________________________ >mapserver-users mailing list >mapserver-users@lists.osgeo.org >http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Владимир
_______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users