<div class="gmail_quote">Hello,<div><br></div><div>I have compiled MapServer 5.6.4 with PHPMapscript on FreeBSD 8.1.</div><div>During configuration Ming support was added.</div><div>phpinfo() returns the following:</div><div>
<span style="font-family:sans-serif;font-size:medium"><h2 style="text-align:center;font-family:sans-serif;font-size:20px">
<a name="12af031fd376d527_module_MapScript">MapScript</a></h2><table border="0" cellpadding="3" width="600" style="text-align:center;border-collapse:collapse;margin-left:auto;margin-right:auto"><tbody><tr><td style="text-align:left;font-family:sans-serif;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(0, 0, 0);border-right-color:rgb(0, 0, 0);border-bottom-color:rgb(0, 0, 0);border-left-color:rgb(0, 0, 0);font-size:12px;vertical-align:baseline;background-color:rgb(204, 204, 255);font-weight:bold;color:rgb(0, 0, 0)">

MapServer Version</td><td style="text-align:left;font-family:sans-serif;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(0, 0, 0);border-right-color:rgb(0, 0, 0);border-bottom-color:rgb(0, 0, 0);border-left-color:rgb(0, 0, 0);font-size:12px;vertical-align:baseline;background-color:rgb(204, 204, 204);color:rgb(0, 0, 0)">

MapServer version 5.6.4 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER SUPPORTS=GEOS INPUT=TIFF INPUT=EPPL7 INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=SHAPEFILE</td>

</tr><tr><td style="text-align:left;font-family:sans-serif;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(0, 0, 0);border-right-color:rgb(0, 0, 0);border-bottom-color:rgb(0, 0, 0);border-left-color:rgb(0, 0, 0);font-size:12px;vertical-align:baseline;background-color:rgb(204, 204, 255);font-weight:bold;color:rgb(0, 0, 0)">

PHP MapScript Version</td><td style="font-family:sans-serif;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(0, 0, 0);border-right-color:rgb(0, 0, 0);border-bottom-color:rgb(0, 0, 0);border-left-color:rgb(0, 0, 0);font-size:12px;vertical-align:baseline;background-color:rgb(204, 204, 204);color:rgb(0, 0, 0)">

<div style="text-align:left">($Revision: 10204 $ $Date: 2010-06-02 06:57:48 -0700 (Wed, 02 Jun 2010) $)</div><br></td></tr></tbody></table></span><span style="font-family:sans-serif;font-size:medium"><h2 style="text-align:center;font-family:sans-serif;font-size:20px">

<a name="12af031fd376d527_module_ming">ming</a></h2><table border="0" cellpadding="3" width="600" style="text-align:center;border-collapse:collapse;margin-left:auto;margin-right:auto"><tbody><tr><td style="text-align:left;font-family:sans-serif;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(0, 0, 0);border-right-color:rgb(0, 0, 0);border-bottom-color:rgb(0, 0, 0);border-left-color:rgb(0, 0, 0);font-size:12px;vertical-align:baseline;background-color:rgb(204, 204, 255);font-weight:bold;color:rgb(0, 0, 0)">

Ming SWF output library</td><td style="text-align:left;font-family:sans-serif;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(0, 0, 0);border-right-color:rgb(0, 0, 0);border-bottom-color:rgb(0, 0, 0);border-left-color:rgb(0, 0, 0);font-size:12px;vertical-align:baseline;background-color:rgb(204, 204, 204);color:rgb(0, 0, 0)">

enabled</td></tr><tr><td style="text-align:left;font-family:sans-serif;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(0, 0, 0);border-right-color:rgb(0, 0, 0);border-bottom-color:rgb(0, 0, 0);border-left-color:rgb(0, 0, 0);font-size:12px;vertical-align:baseline;background-color:rgb(204, 204, 255);font-weight:bold;color:rgb(0, 0, 0)">

Version</td><td style="text-align:left;font-family:sans-serif;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(0, 0, 0);border-right-color:rgb(0, 0, 0);border-bottom-color:rgb(0, 0, 0);border-left-color:rgb(0, 0, 0);font-size:12px;vertical-align:baseline;background-color:rgb(204, 204, 204);color:rgb(0, 0, 0)">

0.4.3</td></tr></tbody></table><br></span></div><div><span style="font-family:sans-serif;font-size:medium">I am using the following php script (<b>testmap.php</b>):</span></div><div><span style="font-family:sans-serif;font-size:medium"><br>

</span></div><div><span style="font-family:sans-serif;font-size:medium"><div>&lt;?php</div><div>$map = ms_newMapObj(&quot;/map/apache/htdocs/map/mapsql.map&quot;);</div><div>$image=$map-&gt;draw();</div>
<div>$image_url=$image-&gt;saveImage(&quot;\\tmp&quot;);</div><div>?&gt;</div><div><br></div><div>&lt;HTML&gt;</div><div><br></div><div><span style="white-space:pre-wrap">        </span>&lt;HEAD&gt;</div><div><span style="white-space:pre-wrap">                </span>&lt;TITLE&gt;Example 1: Displaying a map&lt;/TITLE&gt;</div>

<div><span style="white-space:pre-wrap">        </span>&lt;/HEAD&gt;</div><div><br></div><div>&lt;BODY&gt;</div><div>    &lt;br&gt;</div><div>    &lt;IMG SRC=&lt;?php echo $image_url; ?&gt; &gt;</div><div>&lt;/BODY&gt;</div>
<div><br></div><div>&lt;/HTML&gt;</div><div><br></div><div>and the contents for <b>mapsql.map</b> file is:</div><div><div><br></div><div>MAP NAME &quot;Europe in purple&quot;</div><div><br></div><div>    SIZE 400 400</div>

<div>    STATUS ON</div><div><span style="white-space:pre-wrap">        </span>EXTENT 478895 4615055 485900 4620056</div><div><br></div><div>    UNITS METERS</div><div>    SHAPEPATH &quot;/home/map/SHP&quot;</div>
<div><br></div><div><span style="white-space:pre-wrap">        </span>WEB</div><div>        IMAGEPATH &quot;/map/apache/htdocs/tmp/&quot;</div><div>        IMAGEURL &quot;/tmp/&quot;</div><div>        METADATA</div>
<div>           &quot;wms_title&quot;     &quot;wms_title&quot;  ##required</div><div>           &quot;wms_onlineresource&quot; &quot;<a href="http://soso.freebsd.host/cg-bin/mapserv?map=/map/apache/htdocs/mapsql.map&amp;" target="_blank">http://soso.freebsd.host/cg-bin/mapserv?map=/map/apache/htdocs/mapsql.map&amp;</a>&quot;</div>

<div>           &quot;wms_srs&quot; &quot;EPSG:32638&quot;</div><div>        END</div><div>    END</div><div><span style="white-space:pre-wrap">        </span></div><div>PROJECTION</div><div><span style="white-space:pre-wrap">        </span>&quot;proj=utm&quot;</div>

<div><span style="white-space:pre-wrap">        </span>&quot;zone=38&quot;</div><div><span style="white-space:pre-wrap">        </span>&quot;ellps=WGS84&quot;</div><div><span style="white-space:pre-wrap">        </span>&quot;datum=WGS84&quot;</div>

<div><span style="white-space:pre-wrap">        </span>&quot;units=m&quot;</div><div><span style="white-space:pre-wrap">        </span>&quot;no_defs&quot;</div><div>END</div><div><br></div><div><span style="white-space:pre-wrap">                </span>QUERYMAP</div>

<div><span style="white-space:pre-wrap">                        </span>COLOR 0 0 255</div><div><span style="white-space:pre-wrap">                        </span>STATUS ON</div><div><span style="white-space:pre-wrap">                        </span>STYLE HILITE</div>
<div><span style="white-space:pre-wrap">                </span>END</div><div><br></div><div><br></div><div><span style="white-space:pre-wrap">        </span>LAYER</div><div>        NAME &quot;main_streets&quot;</div>
<div><span style="white-space:pre-wrap">                </span></div><div><span style="white-space:pre-wrap">                </span>TOLERANCE 1</div><div><span style="white-space:pre-wrap">                </span>TOLERANCEUNITS meters</div>
<div><span style="white-space:pre-wrap">                </span></div><div>        CONNECTIONTYPE postgis</div><div>        CONNECTION &quot;user=pgsql dbname=pgsql host=soso.freebsd.host&quot;</div><div><span style="white-space:pre-wrap">                </span>TEMPLATE &quot;../query/query_template.html&quot;</div>

<div>        METADATA</div><div><span style="white-space:pre-wrap">                </span>   QUERYABLE &quot;true&quot;</div><div><span style="white-space:pre-wrap">                </span>   fields &#39;quca_ge:ქუჩის დასახელება,gid:გიდი&#39;</div>
<div><span style="white-space:pre-wrap">                </span>   hyperlink &#39;quca|<a href="http://myurl.com" target="_blank">http://myurl.com</a>&#39;</div><div><span style="white-space:pre-wrap">                </span>   searchfield &quot;quca&quot;</div>

<div><span style="white-space:pre-wrap">        </span>      RESULT_FIELDS  &quot;quca_ge&quot;</div><div><span style="white-space:pre-wrap">        </span>      RESULT_HEADERS &quot;the_geom&quot;</div>
<div>        END</div><div>        TYPE POLYGON</div><div>        STATUS ON</div><div><span style="white-space:pre-wrap">                </span>DATA &quot;the_geom from main_streets&quot;</div><div>        CLASS</div>
<div>            STYLE</div><div>                COLOR 110 50 100</div><div>                OUTLINECOLOR 200 200 200</div><div>            END</div><div>        END</div><div>    END</div><div><br></div><div>END</div><div>

<br></div><div><b>Everything works fine</b>, but now <b>i want to generate flash output</b>. So I added  the following block to <b>mapsql.map </b>file:</div><div><br></div><div><div>OUTPUTFORMAT</div><div>  NAME swf</div>

<div>  DRIVER &quot;SWF&quot;</div><div>  MIMETYPE &quot;application/x-shockwave-flash&quot;</div><div>  EXTENSION &quot;swf&quot;</div><div>  IMAGEMODE PC256</div><div>  FORMATOPTION &quot;OUTPUT_MOVIE=SINGLE&quot;</div>

<div>END</div></div><div><br></div><div>flash output is not generated and the following is appeared in apache error log: <b>Segmentation fault (11).</b></div><div>When trying to <b>launch </b>the testmap.php script from<b> the shell</b> the following happens:</div>

<div>/php/bin/php ./testmap.php</div><div><b>newSFWBitmapFillStyle: not a valid Bitmap FillStyle: 0</b></div><div>Segmentation fault (core dumped)</div><div><br></div><div>What is the reason of this ? What am I doing wrong ?</div>

<div><br></div><div><span style="font-family:arial, sans-serif;line-height:19px">Any suggestions or help will be appreciated.</span></div><div><font face="arial, sans-serif"><span style="line-height:19px"><br>
</span></font></div><div><font face="arial, sans-serif"><span style="line-height:19px">Joseph.</span></font></div><div><font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="font-size: small;"><font class="Apple-style-span" face="sans-serif"><span class="Apple-style-span" style="font-size: medium;"><b><br>
</b></span></font></span></font></div></div></span></div></div>