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 class="Apple-style-span" style="font-family: sans-serif; font-size: medium; "><h2 style="text-align: center;font-family: sans-serif; font-size: 20px; ">
<a name="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 class="e" 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 class="v" 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 class="e" 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 class="v" 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 class="Apple-style-span" style="font-family: sans-serif; font-size: medium; "><h2 style="text-align: center;font-family: sans-serif; font-size: 20px; ">
<a name="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 class="e" 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 class="v" 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 class="e" 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 class="v" 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 class="Apple-style-span" style="font-family: sans-serif; font-size: medium; ">I am using the following php script (<b>testmap.php</b>):</span></div><div><span class="Apple-style-span" style="font-family: sans-serif; font-size: medium; "><br>
</span></div><div><span class="Apple-style-span" style="font-family: sans-serif; font-size: medium; "><div><?php</div><div>$map = ms_newMapObj("/map/apache/htdocs/map/mapsql.map");</div><div>$image=$map->draw();</div>
<div>$image_url=$image->saveImage("\\tmp");</div><div>?></div><div><br></div><div><HTML></div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span><HEAD></div><div><span class="Apple-tab-span" style="white-space:pre"> </span><TITLE>Example 1: Displaying a map</TITLE></div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span></HEAD></div><div><br></div><div><BODY></div><div> <br></div><div> <IMG SRC=<?php echo $image_url; ?> ></div><div></BODY></div>
<div><br></div><div></HTML></div><div><br></div><div>and the contents for <b>mapsql.map</b> file is:</div><div><div><br></div><div>MAP NAME "Europe in purple"</div><div><br></div><div> SIZE 400 400</div>
<div> STATUS ON</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>EXTENT 478895 4615055 485900 4620056</div><div><br></div><div> UNITS METERS</div><div> SHAPEPATH "/home/map/SHP"</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>WEB</div><div> IMAGEPATH "/map/apache/htdocs/tmp/"</div><div> IMAGEURL "/tmp/"</div><div> METADATA</div>
<div> "wms_title" "wms_title" ##required</div><div> "wms_onlineresource" "<a href="http://soso.freebsd.host/cg-bin/mapserv?map=/map/apache/htdocs/mapsql.map&">http://soso.freebsd.host/cg-bin/mapserv?map=/map/apache/htdocs/mapsql.map&</a>"</div>
<div> "wms_srs" "EPSG:32638"</div><div> END</div><div> END</div><div><span class="Apple-tab-span" style="white-space:pre"> </span></div><div>PROJECTION</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>"proj=utm"</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>"zone=38"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>"ellps=WGS84"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>"datum=WGS84"</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>"units=m"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>"no_defs"</div><div>END</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>QUERYMAP</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>COLOR 0 0 255</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>STATUS ON</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>STYLE HILITE</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>END</div><div><br></div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>LAYER</div><div> NAME "main_streets"</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>TOLERANCE 1</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>TOLERANCEUNITS meters</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span></div><div> CONNECTIONTYPE postgis</div><div> CONNECTION "user=pgsql dbname=pgsql host=soso.freebsd.host"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>TEMPLATE "../query/query_template.html"</div>
<div> METADATA</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> QUERYABLE "true"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> fields 'quca_ge:ქუჩის დასახელება,gid:გიდი'</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> hyperlink 'quca|<a href="http://myurl.com">http://myurl.com</a>'</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> searchfield "quca"</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> RESULT_FIELDS "quca_ge"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> RESULT_HEADERS "the_geom"</div>
<div> END</div><div> TYPE POLYGON</div><div> STATUS ON</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>DATA "the_geom from main_streets"</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 "SWF"</div><div> MIMETYPE "application/x-shockwave-flash"</div><div> EXTENSION "swf"</div><div> IMAGEMODE PC256</div><div> FORMATOPTION "OUTPUT_MOVIE=SINGLE"</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 class="Apple-style-span" style="font-family: arial, sans-serif; line-height: 19px; ">Any suggestions or help will be appreciated.</span></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="line-height: 19px; "><br>
</span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="line-height: 19px;">Joseph.</span></font></div><div><b><br></b></div><div><br></div></div></span></div>