[Mapserver-users] Segmentation Fault -- reference image -- PHP
Ed Martin
edman007x at mac.com
Sat Nov 29 08:59:53 PST 2003
i am using the map file and map stuff from the cvs mapserver (did not
compile from cvs, i used the stable version 4.0.1) and when i try to
get the reference image using a very simple script i get the jpeg
header an then a segmentation fault when run in the command line and a
blank page when in a browser, turning off the jpeg header still gives
me a blank page
here is the php file i am using
<?
require_once('../inc/conf.inc.php');//get config
//load mapscript
dl("php_mapscript.so");
header("Content-type: image/jpeg");
// start map
$map=ms_newMapObj("tests/test.map");
$img=$map->drawReferenceMap();
$img->saveImage('');
?>
and here is the reference part of the map file
#refence map
REFERENCE
IMAGE ./reference.jpeg
EXTENT -0.5 50.977222 0.5 51.977222
SIZE 120 120
STATUS ON
COLOR 255 255 0
OUTLINECOLOR 255 100 0
STATUS ON
MARKER "line"
MARKERSIZE 5
MINBOXSIZE 50
MINBOXSIZE 100
END
i have output set to jpeg and changing the reference image to jpg or
png doesn't help and i tried gif and that gave an error saying that it
couldn't load it (probably because gifs aren't supported by gd, but
this page (
http://mapserver.gis.umn.edu/doc40/mapfile-reference.html#referencemap
) says it has to be a gif)
could it be the way i made the reference image, i just took the main
image, cropped out the boarder, shrunk it to 120x120 and saved it in
various formats
i see nothing in my apache logs, but i know it is logging to them
because a parse error will show up, i have error reporting set to the
highest (E_ALL), i'm using mapserver 4.0.1, php 4.3.4 as CGI, apache
2.0.48, slackware linux 9.0
so does anyone have any clue as to what is causing this, my map file,
do i have to put more stuff in the php file, is it the way i made the
image, or is it a bug
More information about the MapServer-users
mailing list