Hi list,<br><br>We are migrating our servers to a new server based on Centos and we are suffering problems with the use of phpmapscript.<br><br>Postgis is working correctly when accessing from php but it fails when executing the code bellow (our script is more complicated but I have removed the other issues just to check what is failling and aboid side effect from our code). The problem is that mapserver as cgi works correctly with the same map file and the same layer and mapscript is compiled at the same time than mapserver with postgis support (--with-php in the mapserver configure options). The apache logs shows an Unexpected process ending with Segmentation fault (11) error. The PostGIS log just sais that the connection was broken unexpected by the client but doesn&#39;t give more details.<br>
<br>If anyone have any sugestion to follow up the testing and debugging, any other way to try to find the problem or at least more details about what could be failling, because we have no more ideas to get any clue about what is happening.<br>
<br>Our configuration:<br><br>Mapserver 4.10.2<br>Postgres 8.3.5<br>PHP 5.2.6<br>Centos  5.2<br><br>Here is the layer declaration of the map file:<br><br>LAYER<br>NAME &quot;postgislayer&quot;<br>CONNECTIONTYPE postgis<br>
CONNECTION &quot;host=localhost user=**** password=***** dbname=*****&quot;<br>DATA &quot;wkb_geometry from postgislayer using unique ogc_fid using SRID=32629&quot;<br>STATUS ON<br>TYPE polygon<br>CLASS<br>COLOR 0 0 255<br>
OUTLINECOLOR 0 0 255<br>END<br>PROJECTION<br>&quot;init=epsg:32629&quot;<br> END<br>METADATA<br>&quot;wms_title&quot; &quot;Test Layer&quot;<br>&quot;wms_srs&quot; &quot;epsg:32629&quot;<br>END<br>END<br><br><br>My php code is as follows (just the wms wrapper from mapserver documentation): <br>
<br>&lt;?php<br>    $req_cgi = ms_newOwsRequestObj();<br>    if ($_SERVER[&#39;REQUEST_METHOD&#39;]==&quot;POST&quot;)<br>    {<br>        foreach ($_POST as $key =&gt; $value)<br>        {<br>            $req_cgi-&gt;setparameter($key, $value);<br>
        }<br>    }<br>    else<br>    {<br>        foreach ($_GET as $key =&gt; $value)<br>        {<br>            $req_cgi-&gt;setparameter($key, $value);<br>        }<br>    }<br>    ms_ioinstallstdouttobuffer();<br>    $oMap = ms_newMapobj($req_cgi-&gt;getvaluebyname(&quot;map&quot;));<br>
    $oMap-&gt;owsdispatch($req_cgi);<br>    //$contenttype = ms_iostripstdoutbuffercontenttype();<br>    if ($contenttype == &#39;&#39;) header(&#39;Content-type: image/png&#39;);<br>    else<br>    {<br>        $header = &#39;Content-type: &#39;.$contenttype;<br>
        header($header);<br>    }<br>    ms_iogetStdoutBufferBytes();<br>    ms_ioresethandlers();<br>?&gt;<br><br><br>