FW: [UMN_MAPSERVER-USERS] Perl Mapscript driving me bonkers?
Simpson
asimpson at I-55.COM
Wed Apr 20 05:30:34 PDT 2005
Nick,
The old libmap.a from 3.x may still be in your path and is being picked up
during mapscript compilation.
Drew.
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On
Behalf Of Nick Floersch
Sent: Tuesday, April 19, 2005 4:36 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Perl Mapscript driving me bonkers?
Hello All,
PROBLEM: Upgraded PerlMapscript does not work with web app written using
older PerlMapscript
BACKGROUND:
New to the list, and relatively new to Mapserver and Perl MapScript.
We recently upgraded our mapserver installation from some older version
(perhaps 3.x) to 4.4.1.
We have a web app that uses Perl MapScript to navigate/explore some maps
and such - pretty standard.
As part of the MapServer upgrade, I upgraded PerlMapscript because I was
told that the previous Mapserver installation we had (which I did not
build or install) did not have TIFF raster support built in, and we
needed it for the next version of our little PerlMapscript web app. Our
new mapserver executable reports that it supports as many raster formats
as we're going to be able to use (png, bmp, gif, tiff, gd, pdf, ming,
etc..). I'm fairly sure I've built it right because it works for some
other purposes.
So, after building the newest mapserver and then installing the perl
mapscript which came with it, the web app does not work. I saved the old
PerlMapscript libs and put them back in place, and stuff works again.
Good...
CURRENT STATUS:
We either need to know that the old version of Perlmapscript did have
support for TIFF rasters, or figure out how to make the new version of
mapscript and our webapp work together. I am a sysadmin who does not
know anything about Mapserver beyond what it takes to build it. I am a
Perl programmer (no Guru, but still). I do not know enough about GIS to
write a Mapfile from scratch.
Currently, the web app gets to the following line:
v---snip---
#Create map object that refers to full extent map
my $mapObjFull = new mapscript::mapObj("../mapserver/malibu.map") or
die("$mapscript::ms_error->{message}");
warn "Got Here 2.5";
^---snip---
And never prints "Got Here 2.5" or continues or does anything. There
are, of course, various "Got Here 2.x" items before this point, and it
prints all of them (no I don't use debuggers, I use 'warn' statements).
I tried using the $ENV{MS_ERRFILE} or whatever it is to setup a debug
log - it never seems to work, no matter where I put the file or what
permissions I give it. So that hasn't helped.
As I said, this is a web app, so my "Got Here" statements print into the
Apache error_log file. I decided to try a command line version to see if
I missed anything... But I didn't.
v---snip---
#!/usr/bin/perl -w
use mapscript;
use XBase;
my $mapObjFull = new mapscript::mapObj("../mapserver/<knowngood>.map")
or die ("$mapscript::ms_error->{message}");
warn "Got Here 2.5";
^---snip---
I run it and I get errors about only using the $mapscript::ms_error
variable once. So I commented it out:
v---snip---
#!/usr/bin/perl -w
use mapscript;
use XBase;
my $mapObjFull = new mapscript::mapObj("../mapserver/<knowngood>.map");
# or die ("$mapscript::ms_error->{message}");
warn "Got Here 2.5";
^---snip---
And now when I run the thing I just get:
"Segmentation fault"
If I run the same script with the old mapscript, I get:
"Got Here 2.5"
Which is what I want, at least at this point.
I tried re-swigging the perl mapscript and it did change the output a
bit.
Before re-swigging the output of my script was:
"Killed"
And now I get the segfault thing.
My perl version is 5.8.1
My Linux is Mandrake 9.2.
Mapserver is 4.4.1 and PerlMapscript is whatever version comes with MS
4.4.1
At this point, I just went through major headaches building MS 4.4.1, so
I would prefer not to upgrade to 4.4.2, and I cannot upgrade Mandrake
9.2, although I can rip out software and recompile pieces by hand - ie I
don't have the install media for a newer version of Mandrake, though I
doubt that is the problem.
Apache is 2.0.47, though I doubt that matters since I get errors at the
command line.
The machine has 1gb of RAM and a P4 cpu.
I can't think of any other details, but I would be very grateful to
anyone who even hazards a guess here - I have no idea what to do.
I did see various posts on the Wiki about Perl 5.8 and Mapscript, but I
never had any trouble building mapscript - ie. No errors during the
mapscript build.
Is the mapscript wrapper something that works completely independantly
of the Mapserver that is installed? I don't fully understand the
relationship between the mapserver executable and mapscript libraries,
and thus also don't understand if having TIFF support in the mapserver
executable has any bearing on TIFF support in the mapscript libraries.
Thank you for reading this far,
Nicholas Floersch
---
Nicholas E. Floersch (pr. Floorsh)
IT Group Manager
Direct / 802.229.1872 Cell / 802.249.2516
E-Mail / nfloersch at stone-env.com
Stone Environmental, Inc.
535 Stone Cutters Way, Montpelier, Vermont 05602
Tel / 802.229.4541 Fax / 802.229.5417
Web Site / www.stone-env.com
More information about the MapServer-users
mailing list