[mapserver-users] Inappropriate ioctl for device

Aaron D. Hunt hunt@zedxinc.com
Fri, 21 Jun 2002 13:34:06 -0700


This is a multi-part message in MIME format.

------=_NextPart_000_0112_01C21928.50C1CE60
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

When i add a projection tag into my map file I get "Unable to open =
mapfile. Inappropriate ioctl for device" in my error log when I call my =
php script. Does anyone know why this may be happing or what it means?

I am using mapserver 3.6 compiled with proj,ogr,gdal and php.

Aaron D. Hunt

Here is my map file. I used all geographic just to test.
#
# Start of map file
#
NAME DEMO
  PROJECTION
    geographic
  END

STATUS ON
SIZE 380 380
EXTENT -91.1644 34.6098 -91.1306 34.6399
UNITS DD
SHAPEPATH "/tmp"
IMAGECOLOR 255 255 255


#
# Start of web interface definition
#
WEB
  IMAGEPATH "/home/httpd/html/dy_images/"
  IMAGEURL "/dy_images/"
END

LEGEND
 STATUS embed
 TRANSPARENT TRUE
 LABEL
      COLOR 0 0 0
      SIZE small
 END
 POSITION lr
END


SCALEBAR=20
 INTERVALS 7
 STATUS embed
 TRANSPARENT TRUE
 POSITION ll
 STYLE 1
 SIZE 300 5

 LABEL
      COLOR 0 0 0
      SIZE tiny   =20
 END
END

LAYER
  NAME field
  PROJECTION
    geographic
  END
  TYPE POLYGON
  DATA "/tmp/shape"
  STATUS ON
  CLASS
    NAME "Boundary"
    SIZE 5
    OUTLINECOLOR 255 0 0
    COLOR -1 -1 -1
    END
END
LAYER
  NAME att
  PROJECTION
    geographic
  END
  TYPE POLYGON
  DATA "/tmp/shape"
  STATUS ON
  CLASS
    NAME "Boundary"
    SIZE 5
    OUTLINECOLOR 0 255 0
    COLOR -1 -1 -1
    END
END

LAYER
  NAME "roads"
  PROJECTION
    geographic
  END
  TYPE line
  TILEINDEX "/usr/gisdata/map_info/scripts/maj_roads"
  TILEITEM "location"
  STATUS on=20
   LABELITEM "STREETNAME"
  CLASS
    NAME "Minor Roads"
    OUTLINECOLOR 0 0 0
    COLOR 150 150 0
    LABEL#
 angle auto
 MINDISTANCE 20
 SIZE medium
 COLOR 150 150 150
 END
    END
END # LAYER

LAYER
  NAME "roads"
  PROJECTION
    geographic
  END
  TYPE line
  TILEINDEX "/usr/gisdata/map_info/scripts/min_roads"
  TILEITEM "location"
 STATUS on=20
   LABELITEM "HIGHWAY"
 CLASS
   NAME "Major Roads"
    OUTLINECOLOR 0 0 0
    COLOR 50 50 0
    LABEL
 angle auto
 MINDISTANCE 20
 SIZE medium
 COLOR 150 150 150
 END
   END
END # LAYER


END # Map File=20


------=_NextPart_000_0112_01C21928.50C1CE60
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4807.2300" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>When i add a projection tag into my map =
file I get=20
"Unable to open mapfile. Inappropriate ioctl for device" in my error log =
when I=20
call my php script. Does anyone know why this may be happing or what it=20
means?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I am using mapserver 3.6 compiled with=20
proj,ogr,gdal and php.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Aaron D. Hunt<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Here is my map file. I used all =
geographic just to=20
test.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>#<BR># Start of map file<BR>#<BR>NAME=20
DEMO<BR>&nbsp; PROJECTION<BR>&nbsp;&nbsp;&nbsp; geographic<BR>&nbsp;=20
END</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>STATUS ON<BR>SIZE 380 380<BR>EXTENT =
-91.1644=20
34.6098 -91.1306 34.6399<BR>UNITS DD<BR>SHAPEPATH "/tmp"<BR>IMAGECOLOR =
255 255=20
255</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><BR>#<BR># Start of web interface=20
definition<BR>#<BR>WEB<BR>&nbsp; IMAGEPATH=20
"/home/httpd/html/dy_images/"<BR>&nbsp; IMAGEURL=20
"/dy_images/"<BR>END</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>LEGEND<BR>&nbsp;STATUS =
embed<BR>&nbsp;TRANSPARENT=20
TRUE<BR>&nbsp;LABEL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 0 0=20
0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE =
small<BR>&nbsp;END<BR>&nbsp;POSITION=20
lr<BR>END</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><BR>SCALEBAR <BR>&nbsp;INTERVALS =
7<BR>&nbsp;STATUS=20
embed<BR>&nbsp;TRANSPARENT TRUE<BR>&nbsp;POSITION ll<BR>&nbsp;STYLE=20
1<BR>&nbsp;SIZE 300 5</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>&nbsp;LABEL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR=20
0 0 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE tiny&nbsp;&nbsp;&nbsp;=20
<BR>&nbsp;END<BR>END</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>LAYER<BR>&nbsp; NAME field<BR>&nbsp;=20
PROJECTION<BR>&nbsp;&nbsp;&nbsp; geographic<BR>&nbsp; END<BR>&nbsp; TYPE =

POLYGON<BR>&nbsp; DATA "/tmp/shape"<BR>&nbsp; STATUS ON<BR>&nbsp;=20
CLASS<BR>&nbsp;&nbsp;&nbsp; NAME "Boundary"<BR>&nbsp;&nbsp;&nbsp; SIZE=20
5<BR>&nbsp;&nbsp;&nbsp; OUTLINECOLOR 255 0 0<BR>&nbsp;&nbsp;&nbsp; COLOR =
-1 -1=20
-1<BR>&nbsp;&nbsp;&nbsp; END<BR>END<BR>LAYER<BR>&nbsp; NAME =
att<BR>&nbsp;=20
PROJECTION<BR>&nbsp;&nbsp;&nbsp; geographic<BR>&nbsp; END<BR>&nbsp; TYPE =

POLYGON<BR>&nbsp; DATA "/tmp/shape"<BR>&nbsp; STATUS ON<BR>&nbsp;=20
CLASS<BR>&nbsp;&nbsp;&nbsp; NAME "Boundary"<BR>&nbsp;&nbsp;&nbsp; SIZE=20
5<BR>&nbsp;&nbsp;&nbsp; OUTLINECOLOR 0 255 0<BR>&nbsp;&nbsp;&nbsp; COLOR =
-1 -1=20
-1<BR>&nbsp;&nbsp;&nbsp; END<BR>END</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>LAYER<BR>&nbsp; NAME "roads"<BR>&nbsp;=20
PROJECTION<BR>&nbsp;&nbsp;&nbsp; geographic<BR>&nbsp; END<BR>&nbsp; TYPE =

line<BR>&nbsp; TILEINDEX =
"/usr/gisdata/map_info/scripts/maj_roads"<BR>&nbsp;=20
TILEITEM "location"<BR>&nbsp; STATUS on <BR>&nbsp;&nbsp; LABELITEM=20
"STREETNAME"<BR>&nbsp; CLASS<BR>&nbsp;&nbsp;&nbsp; NAME "Minor=20
Roads"<BR>&nbsp;&nbsp;&nbsp; OUTLINECOLOR 0 0 0<BR>&nbsp;&nbsp;&nbsp; =
COLOR 150=20
150 0<BR>&nbsp;&nbsp;&nbsp; LABEL#<BR>&nbsp;angle =
auto<BR>&nbsp;MINDISTANCE=20
20<BR>&nbsp;SIZE medium<BR>&nbsp;COLOR 150 150=20
150<BR>&nbsp;END<BR>&nbsp;&nbsp;&nbsp; END<BR>END # LAYER</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>LAYER<BR>&nbsp; NAME "roads"<BR>&nbsp;=20
PROJECTION<BR>&nbsp;&nbsp;&nbsp; geographic<BR>&nbsp; END<BR>&nbsp; TYPE =

line<BR>&nbsp; TILEINDEX =
"/usr/gisdata/map_info/scripts/min_roads"<BR>&nbsp;=20
TILEITEM "location"<BR>&nbsp;STATUS on <BR>&nbsp;&nbsp; LABELITEM=20
"HIGHWAY"<BR>&nbsp;CLASS<BR>&nbsp;&nbsp; NAME "Major=20
Roads"<BR>&nbsp;&nbsp;&nbsp; OUTLINECOLOR 0 0 0<BR>&nbsp;&nbsp;&nbsp; =
COLOR 50=20
50 0<BR>&nbsp;&nbsp;&nbsp; LABEL<BR>&nbsp;angle =
auto<BR>&nbsp;MINDISTANCE=20
20<BR>&nbsp;SIZE medium<BR>&nbsp;COLOR 150 150 =
150<BR>&nbsp;END<BR>&nbsp;&nbsp;=20
END<BR>END # LAYER</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><BR>END # Map File =
<BR></DIV></FONT></BODY></HTML>

------=_NextPart_000_0112_01C21928.50C1CE60--