PERL interface trouble

Simpson drewsimpson at BELLSOUTH.NET
Wed Jul 5 16:29:25 EDT 2006


To rule out issues with Apache, will the script run from the command line.

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On
Behalf Of Joe Bussell
Sent: Wednesday, July 05, 2006 2:48 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] PERL interface trouble


Nope, same logical volume.  Identical results from `df` verify this.

Joe Bussell
On Time Systems


Simpson wrote:

>Is /usr an automount?
>
>-----Original Message-----
>From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On
>Behalf Of Joe Bussell
>Sent: Wednesday, July 05, 2006 12:19 PM
>To: MAPSERVER-USERS at LISTS.UMN.EDU
>Subject: Re: [UMN_MAPSERVER-USERS] PERL interface trouble
>
>
>Thank you!  I have mode some progress.  The fact that my fonts/
>directory was not readable escaped my notice.  The msGetErrorString
>function provided that data right away.
>
>I have still have some undesired behavior however.  I added
>$img->save( $outfile );
>carp mapscript::msGetErrorString("\n");
>And it indicates that my image file is not openable for write.  I have
>verified that the entire directory chain indicated in the message is
>world writable.  Is there something else that I need to do?
>
>[Mon Jul  3 15:52:17 2006] -e: Failure: msSaveImageGD(): Unable to
>access file.
>Unable to open file
>/usr/routing/routes/Route1151967137028128.223.40.5.png for writing at
>/usr/routing/perl/dwarp/mapdrawing.pm line 515
>
>I changed my write directory to be a child of /tmp, and everything
>worked out just fine.  I verified that the directory permissions matched
>and could not find any reference in my httpd.conf that would preclude
>writing to a directory off of /usr.  Any ideas as to why this is?
>
>Joe Bussell
>On Time Systems
>
>
>
>Steve Lime wrote:
>  
>
>>You can get at the MapServer error stack with a call like:
>>
>>  my $map = new mapscript::mapObj( $mapfile ) or
>>    
>>
>mapscript::msGetErrorString("\n");
>  
>
>>That may help, or be something to try. I use perl MapScript with 4.8 and
>>    
>>
>the CVS version all the time with good results.
>  
>
>>Steve
>>
>>
>>    
>>
>>>>>Joseph Bussell <joe at OTSYS.COM> 6/30/2006 2:09:06 PM >>>
>>>>>          
>>>>>
>>Does anyone use the latest code with PERL Mapscript?  If shp2img works
>>with my mapfile, is there anything else I can do to understand why my
>>new call for the mapObj fails?
>>
>>Joe Bussell
>>On Time Systems
>>
>>
>>Joseph Bussell wrote:
>>
>>
>>    
>>
>>>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