<HTML><BODY><p><br>Hello All. Please help me to understand what's wrong.<br><br>php mapscript version 6.4.1<br><br>request url:<br><a href="http://192.168.1.65/msscr/msscr3.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" data-mce-href="http://192.168.1.65/msscr/msscr3.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">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</a><br><br></p><p>works in mapfile.map:<br>FILTER (id  in (386,400))<br>but<br>does not work in script.php:<br>$roadsLayer->setFilter("id  in (386,400)");<br>at that no other errors except the string in apache log:<br>[Thu Feb 13 16:03:33.931054 2014] [core:notice] [pid 716] AH00052: child pid 2626 exit signal Segmentation fault (11)<br><br><br>mapfile.map:<br>-----------------------<br>MAP<br>    NAME    "WMSRoadrs"<br>    CONFIG    "PROJ_LIB" "/usr/lib/proj/"<br>    STATUS        ON<br>    WEB         <br>        METADATA<br>            wms_title    "Roadrs"<br>            wms_abstract    "Roadrs"<br>            wms_onlineresource    "http://localhost/msscr/script.php"<br>            wms_srs    "EPSG:3857"    <br>            wms_enable_request        "*"<br>            wms_encoding    "utf-8"<br>        END # end METADATA        <br>    END # end WEB    <br>    PROJECTION<br>        "init=epsg:3857"<br>    END # end PROJECTION<br>    LAYER<br>        NAME    "roads"    <br>        STATUS        ON<br>        CONNECTIONTYPE    postgis<br>        CONNECTION    "user=user password=1 dbname=db host=localhost"<br>        DATA    "coor from tab using unique id using srid=3857"<br><br>       FILTER (id  in (386,400))#-----------works<br><br>        TYPE    LINE        <br>        CLASS <br>            NAME    "дороги"            <br>                STYLE<br>                    COLOR    255 255 255<br>                    WIDTH    10<br>                    OUTLINECOLOR    0 0 255 <br>                    OUTLINEWIDTH    1<br>                END # end STYLE                <br>        END # end CLASS<br>        PROJECTION<br>            "init=epsg:3857"<br>        END # end PROJECTION<br>        METADATA<br>            wms_title    "Demo1"<br>            wms_abstract    "Roads Demo1"            <br>            wms_srs    "EPSG:3857"<br>            wms_include_items    "all"<br>        END # end METADATA<br>    END # end LAYER<br>END # end MAP<br>---------------<br><br data-mce-bogus="1"></p><p>script.php:<br>----------------<br>ini_set('display_errors', E_ALL); <br>error_reporting(E_ALL);<br>$request = ms_newOwsrequestObj();<br>if(!empty($_GET)){<br>    foreach ($_GET as $key => $value) {<br>        $request->setparameter($key, $value);<br>    }<br>}<br>ms_ioinstallstdouttobuffer();<br>$map = ms_newMapobj("mapfile.map");<br>$roadsLayer = $map->getLayerByName("roads");<br><br>$roadsLayer->setFilter("id  in (386,400)");//-----------does not work<br><br>$map->owsDispatch($request);<br>$contenttype = ms_iostripstdoutbuffercontenttype();<br>header('Content-type:'.$contenttype);<br>ms_iogetStdoutBufferBytes();<br>ms_ioresethandlers();<br>----------------<br><br>-- <br>Thanks</p></BODY></HTML>