a problem with mapscript

Stephen Lime steve.lime at dnr.state.mn.us
Fri Feb 23 14:41:26 EST 2001


Probably a parsing error in the mapfile. Use the shp2img utility to test the
mapfile syntax and see what's wrong. There are error strings exported for
mapscript but I can't remember the syntax at the moment.

The os error ($!) probably could be set elsewhere in the process of loading
the mapfile (eg. opening a symbol or font file) and doesn't necessarily mean
that it can't open the mapfile itself.

Steve

Stephen Lime
Internet Applications Analyst

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> "Tom Kralidis" <tomkralidis at hotmail.com> 02/23/01 01:34PM >>>
I tried this out using the ms_demo mapfile, and did not get an ioctl error, 
yet a file not found error on a RedHat6.2:

[naboo:~/mapscript_test]{170}% pwd
/home/tkralidi/mapscript_test
[naboo:~/mapscript_test]{171}% cat ./test.pl
#!/usr/bin/perl -w

use mapscript;
use strict;

my $map = new mapObj('/home/tkralidi/mapscript_test/demo.map') or die 
"Unable to open mapfile: $!\n";
my $img = $map->draw() or die('Unable to draw map $!');
mapscript::msSaveImage($img, '/tmp/imgfile', $map->{interlace}, 
$map->{transparent});
[naboo:~/mapscript_test]{172}% perl ./test.pl
Unable to open mapfile: No such file or directory
[naboo:~/mapscript_test]{173}%

a run with a -d switch gives me this:

[naboo:~/mapscript_test]{173}% perl -d test.pl

Loading DB routines from perl5db.pl version 1.0402
Emacs support available.

Enter h or `h h' for help.

main::(test.pl:6):      my $map = new 
mapObj('/home/tkralidi/mapscript_test/demo.map') or die "Unable to ope
n mapfile: $!\n";
  DB<1> next
Exiting eval via next at (eval 7) line 2.
        eval '($@, $!, $^E, $,, $/, $\\, $^W) = @saved;package main; $^D = 
$^D | $DB::db_stop;
next;

;' called at /usr/lib/perl5/5.00503/perl5db.pl line 1239
        DB::eval called at /usr/lib/perl5/5.00503/perl5db.pl line 1133
        DB::DB called at test.pl line 6

What gives here?

..Tom

>From: "Stephen Lime" <steve.lime at dnr.state.mn.us>
>To: <tomkralidis at hotmail.com>,<paul.jacobs at javel.nl>, 
><mapserver-users at lists.gis.umn.edu>
>Subject: Re: a problem with mapscript
>Date: Wed, 21 Feb 2001 09:33:37 -0600
>MIME-Version: 1.0
>Received: from [156.98.35.249] by hotmail.com (3.2) with ESMTP id 
>MHotMailBC5D2BBF00744004311F9C6223F93BE90; Wed Feb 21 07:37:36 2001
>Received: from DNR-Message_Server by co5.dnr.state.mn.uswith 
>Novell_GroupWise; Wed, 21 Feb 2001 09:34:13 -0600
>From steve.lime at dnr.state.mn.us Wed Feb 21 07:37:40 2001
>Message-Id: <sa938b95.072 at co5.dnr.state.mn.us>
>X-Mailer: Novell GroupWise Internet Agent 5.5.3.1
>
>As near as I can tell this isn't a MapScript issue but is related somehow 
>to
>communications- sockets, communications ports or console/shell. I haven't
>been able to track down any possible causes or fixes. Try searching
>Google for the phrase "Inappropriate ioctl for device" and you'll see what
>I mean.
>
>Steve
>
>
>Stephen Lime
>Internet Applications Analyst
>
>Minnesota DNR
>500 Lafayette Road
>St. Paul, MN 55155
>651-297-2937
>
> >>> "Tom Kralidis" <tomkralidis at hotmail.com> 02/19/01 09:51AM >>>
> >Hi,
> >
> >i am trying to use mapscript (ms_3.4) and have the following problem.
> >Mapscript compiles ok and i am able to use the example files in the perl
> >directory. The problem is that i can't open any mapfile. $map = new 
>mapObj
> >fails every time. Can anybody help?
> >
> >regards
> >Paul Jacobs
>
>I have the *identical* problem.  I altered the line which open the mapfile
>to check for errors, ie:
>
>my $map = new mapObj('/www/htdocs/gis/mapserv/wmp/wmp-dev.map') or die
>"Unable to open map file: $!\n";
>
>and get:
>
>Unable to open mapfile: Inappropriate ioctl for device
>
>..Tom
>
>_________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




More information about the mapserver-users mailing list