PERL interface trouble

Joseph Bussell joe at OTSYS.COM
Thu Jun 29 16:32:50 EDT 2006


I have verified that shp2img constructs an image that derives form my 
mapfile.  This part looks good.  My mapscript code was written for 
4.4.2, but the one function that is failing does not appear to have 
significantly changed.  I am not getting past construction of the basic 
mapObj from the mapfile.  Specifically, the call to :

my $map = new mapscript::mapObj( $mapfile ) or  carp "Could not create 
mapscript object from mapfile: $mapfile";

produces the error message.  I also went into mapscript.pm and added 
debug code there to be sure I was using the correct module.  The low 
level call is producing an unusable result. 

Joe Bussell
On Time Systems


Stephen Woodbridge wrote:

> Hi Joe,
>
> A couple of things.
>
> 1) what version does you existing code work on?
> 2) There are probably two areas that you will need to change
>    a) the mapfile
>    b) the perl
>
> I would start with using shp2img to make sure you mapfile can load. It 
> will at least print errors that you can read.
>
> shp2img -m /path/to/file.map -o junk.png ...
>
> Once you can get an image then you will probably have more luck 
> tracking down the various mapscript changes. These will depend on what 
> version of mapscript your code was written for.
>
> -Steve W.
>
> Joseph Bussell wrote:
>
>> Greetings Listers,
>>   It has been a while since I deployed a new Mapserver application.  
>> I have been leaning on old source on an old box to get the work 
>> done.  I have been given a new server to set up for our Air Force 
>> project and have had some issues with getting my code to work.  First 
>> of all I am using Mapscript ala PERL.  I recognize that the PERL 
>> interface has not been updated due to a lack of user interest, but I 
>> am still partial to using it if it can still be done (mostly since I 
>> will not have to rewrite my routing path functionality).
>>
>>   My problem is getting the actual mapObj to construct from my 
>> mapfile.  I have not been able to get any debug information our by 
>> checking /tmp/mserrors, which used to work nicely in such cases.  All 
>> I get is an undefined reference.  My code for construction is simple:
>>
>> my $map = new mapscript::mapObj( $mapfile ) or  carp "Could not 
>> create mapscript object from mapfile: $mapfile";
>>
>> in my httpd.conf I define
>> MS_ERRORFILE              /tmp/mserrors.txt
>>
>> My mapfile exists and is very simple.
>> I am running:
>> CentOS release 4.3
>> AMD64, dual core machine
>> Apache/2.0.52
>> mapserver-4.8.3.tar.gz
>> perl, v5.8.5 built for x86_64-linux-thread-multi
>>
>> Thank you for your time.
>>
>> Joe Bussell
>> On Time Systems
>>
>
>



More information about the mapserver-users mailing list