[Mapserver-users] MapScript, help starting? (continued)

Junkmail Box junkmail at deathkeep.com
Mon Mar 3 15:23:17 EST 2003


I'm still having no luck getting mapscript to draw anything. My script is
simply this:


#!/usr/bin/perl -w
use strict;
use mapscript;

$ENV{MS_ERRORFILE} = "/usr/local/mapserv/htdocs/arcata/foo.log";

my $map = new mapObj('/usr/local/mapserv/htdocs/arcata/arcata.map') or
die('Unable to open mapfile.');
my $img = $map->draw() or die('Unable to draw map');
my $void = $img->saveImage('/usr/local/mapserv/htdocs/arcata/example.png',
$mapscript::MS_PNG, $map->{transparent}, $map->{interlace}, 0);


The error log is reporting this:

Mon Mar  3 11:49:44 2003 - msSearchDiskTree(): Unable to access file.
Mon Mar  3 11:49:44 2003 - msSaveImage(): General error message. PNG
output is not available.

The first message, I gather from the mailing list archive, is a missing
spatial index file and isn't terribly important. The second message seems
to be the nasty one. If I change it to example.jpg and
$mapscript::MS_JPEG, I get "JPEG output is not available"

Any ideas what could be causing JPEG output to not work? The strange thing
is that the mapserv CGI program works perfectly with PNG and JPEG output
using the arcata.map file.












More information about the mapserver-users mailing list