[mapserver-dev] PHPMapscript, Ming & Segmentation fault.

Joseph Mamuchishvili iam980 at gmail.com
Wed Sep 8 06:18:21 EDT 2010


Hello,

I have compiled MapServer 5.6.4 with PHPMapscript on FreeBSD 8.1.
During configuration Ming support was added.
phpinfo() returns the following:
MapScript MapServer Version 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 PHP MapScript Version
($Revision: 10204 $ $Date: 2010-06-02 06:57:48 -0700 (Wed, 02 Jun 2010) $)

ming Ming SWF output library enabled Version 0.4.3
I am using the following php script (*testmap.php*):

<?php
$map = ms_newMapObj("/map/apache/htdocs/map/mapsql.map");
$image=$map->draw();
$image_url=$image->saveImage("\\tmp");
?>

<HTML>

<HEAD>
<TITLE>Example 1: Displaying a map</TITLE>
 </HEAD>

<BODY>
    <br>
    <IMG SRC=<?php echo $image_url; ?> >
</BODY>

</HTML>

and the contents for *mapsql.map* file is:

MAP NAME "Europe in purple"

    SIZE 400 400
    STATUS ON
EXTENT 478895 4615055 485900 4620056

    UNITS METERS
    SHAPEPATH "/home/map/SHP"

WEB
        IMAGEPATH "/map/apache/htdocs/tmp/"
        IMAGEURL "/tmp/"
        METADATA
           "wms_title"     "wms_title"  ##required
           "wms_onlineresource" "
http://soso.freebsd.host/cg-bin/mapserv?map=/map/apache/htdocs/mapsql.map&"
           "wms_srs" "EPSG:32638"
        END
    END
PROJECTION
"proj=utm"
 "zone=38"
"ellps=WGS84"
"datum=WGS84"
 "units=m"
"no_defs"
END

QUERYMAP
 COLOR 0 0 255
STATUS ON
STYLE HILITE
 END


LAYER
        NAME "main_streets"
 TOLERANCE 1
TOLERANCEUNITS meters
         CONNECTIONTYPE postgis
        CONNECTION "user=pgsql dbname=pgsql host=soso.freebsd.host"
TEMPLATE "../query/query_template.html"
        METADATA
   QUERYABLE "true"
   fields 'quca_ge:ქუჩის დასახელება,gid:გიდი'
   hyperlink 'quca|http://myurl.com'
   searchfield "quca"
      RESULT_FIELDS  "quca_ge"
      RESULT_HEADERS "the_geom"
        END
        TYPE POLYGON
        STATUS ON
DATA "the_geom from main_streets"
        CLASS
            STYLE
                COLOR 110 50 100
                OUTLINECOLOR 200 200 200
            END
        END
    END

END

*Everything works fine*, but now *i want to generate flash output*. So I
added  the following block to *mapsql.map *file:

OUTPUTFORMAT
  NAME swf
  DRIVER "SWF"
  MIMETYPE "application/x-shockwave-flash"
  EXTENSION "swf"
  IMAGEMODE PC256
  FORMATOPTION "OUTPUT_MOVIE=SINGLE"
END

flash output is not generated and the following is appeared in apache error
log: *Segmentation fault (11).*
When trying to *launch *the testmap.php script from* the shell* the
following happens:
/php/bin/php ./testmap.php
*newSFWBitmapFillStyle: not a valid Bitmap FillStyle: 0*
Segmentation fault (core dumped)

What is the reason of this ? What am I doing wrong ?

Any suggestions or help will be appreciated.

Joseph.
*
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20100908/a66013c9/attachment.html


More information about the mapserver-dev mailing list