Problem
Ed McNierney
ed at TOPOZONE.COM
Fri Apr 1 08:39:29 PST 2005
Ferencik -
Please always reply to the whole list; the first person to answer might
not have ALL the answers, or may not have time to keep answering. And
by sending to the list the discussion goes in the archives, so new users
can first look in the archives for answers to their questions.
The error message basically means what it says. The MapServer CGI does
not have write access to that directory. This is not the same as Apache
allowing READ access to Internet browsers. Your CGI program - running
in the user context you've configured - must have write access to the
tmp directory to create the temporary images.
- Ed
Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA 01863
Phone: +1 (978) 251-4242
Fax: +1 (978) 251-1396
ed at topozone.com
-----Original Message-----
From: Ferencik Ioan [mailto:ferencik.ioan at personal.ro]
Sent: Friday, April 01, 2005 9:23 AM
To: Ed McNierney
Subject: Re: RE: [UMN_MAPSERVER-USERS] Problem
Many thanks Ed,
I modified it and tried to start with
http://127.0.0.1/cgi-bin/mapserv.exe?map=c:\ms4w\rosia\raster.map&mode=b
rowse
got the following message:
msSaveImageGD(): Unable to access file. Unable to open file
/tmp/MS11123650252724.png for writing
I believe that the problem is from Apache configuration.
I do have a few conf files in a special folder(it came from ms4w
aplication and it contain the folowing directives:
Alias /tutorial/data "/ms4w/tutorial/data"
<Directory "/ms4w/tutorial/data">
AllowOverride None
Options Indexes FollowSymLinks Multiviews
Order allow,deny
Allow from all
</Directory>
Alias /tutorial "/ms4w/tutorial/"
<Directory "/ms4w/tutorial/">
AllowOverride None
Options Indexes FollowSymLinks Multiviews
Order allow,deny
Allow from all
</Directory>
Alias /tutorial/tmp/ "c:/ms4w/tutorial/tmp"
<Directory "/tutorial/tmp">
AllowOverride None
Options Indexes FollowSymLinks Multiviews
Order allow,deny
Allow from all
</Directory>
Alias /tutorial/symbols "/ms4w/tutorial/symbols"
<Directory "/ms4w/tutorial/symbols">
AllowOverride None
Options Indexes FollowSymLinks Multiviews
Order allow,deny
Allow from all
</Directory>
Thank you again
> Ferencik -
>
> Look at these two statements:
>
> IMAGEPATH "c:\ms4w\rosia\tmp\ms_tmp\"
> IMAGEURL "c:\ms4w\rosia\tmp\"
>
> You're telling MapServer to put the temporary map images in the
> "tmp\ms_tmp" directory, and telling the browser to request them from
> "tmp". If your Web application has a virtual directory that maps
> "tmp\ms_tmp" to the "tmp" directory then this is OK, but I'm guessing
> that's not the case - you might want to remove the "\ms_tmp" from the
> IMAGEPATH.
>
> - Ed
>
> Ed McNierney
> President and Chief Mapmaker
> TopoZone.com / Maps a la carte, Inc.
> 73 Princeton Street, Suite 305
> North Chelmsford, MA 01863
> Phone: +1 (978) 251-4242
> Fax: +1 (978) 251-1396
> ed at topozone.com
>
> -----Original Message-----
> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]
On
> Behalf Of Ferencik Ioan
> Sent: Friday, April 01, 2005 4:00 AM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-USERS] Problem
>
> Hi list,
>
> I am a new user of Mapserver an I am running the MS4W from DM
> Solutions/Maptools.org Mapserver/Apache/PhpMapScript. I encountered
some
> problems with this map file:
> MAP
> IMAGETYPE PNG24
> EXTENT 382625 577088 404045 595508
> FONTSET "fonts/fonts.list"
> SIZE 1000 1000
> SHAPEPATH "date"
> IMAGECOLOR 255 555 255
> TEMPLATEPATTERN "index"
> PROJECTION
> "init=epsg:31700"
> END
> # Start of LAYER DEFINITIONS
> ---------------------------------------------
> LAYER # layer de tip raster
> NAME dem
> DATA "cj.tif"
> TYPE RASTER
> PROJECTION
> "init=epsg:31700"
> END
> STATUS default
> PROCESSING "BANDS=1,2,3"
> END #--sfarsit layer de tip raster
> LAYER # States polygon layer begins here
> NAME test
> DATA strazi
> STATUS DEFAULT
> TYPE LINE
> PROJECTION
> "init=epsg:31700"
> END
> #CLASSITEM "NAME"
> LABELITEM "NAME"
> CLASS
>
> COLOR 255 255 190
> LABEL
> COLOR 0 0 0
> TYPE TRUETYPE
> FONT arial
> SIZE 8
>
> POSITION LL
> PARTIALS true
> MINDISTANCE 300
> #BUFFER 4
> END
> END
> END
>
> # End of LAYER DEFINITIONS -------------------------------
> WEB
> IMAGEPATH "c:\ms4w\rosia\tmp\ms_tmp\"
> IMAGEURL "c:\ms4w\rosia\tmp\"
> TEMPLATE 'index.html'
>
>
> END
>
>
> END # end of map file/object
>
>
> I can display the map In IE in map mode but when i substitute the
browse
> mode with the folowing template:
>
>
> <!-- MapServer version 4.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG
> OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF SUPPORTS=PROJ SUPPORTS=FREETYPE
> SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
> SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER INPUT=POSTGIS INPUT=OGR
> INPUT=GDAL INPUT=SHAPEFILE --> <html> <title> Aplicatie
> Mapserver</title> <body> <FORM action="/cgi-bin/mapserv.exe"
> method="GET" target="_self">
> <input type="hidden" name="map" value="c:\ms4w\rosia\raster.map" >
> <input type="hidden" name="imgext" value="312153.200000
633250.640000
> 333573.200000 654670.640000">
> <input type="hidden" name="imgxy" value="500 500">
> <input type="hidden" name="zoom" value="1">
> <input type="hidden" name="mode" value="browse">
> <p align="center" style="border: 1px dashed red; "> Aplicatie
> Mapserver</p><hr>
> <div align="center" style="border: 1px dashed red; width: 502px;
> height:
> 502px; ">
>
> <input type="image" name="img"
> value="c:\ms4w\rosia\tmp\MS1112343259276.png" width="500"
height="500">
>
>
>
> </div>
>
>
> </FORM>
>
>
> </body>
>
>
> </html>
>
>
> In browse mode i see only a blank image but i can still pan through
this
> image....Mapserver seems to work. In ta same time in MapServer's temp
> folders there are png images. I don't understand why I can't see those
> images in template and browse mode. Same results on Mandrake Linux
with
> same mapfile and template. I think i am missing something. Any
> suggestions?
> Thanks
>
>
>
>
>
>
> _____________________________________________
> Castiga peste 1000 de premii cu Wella Design!
> http://wella.boom.ro
>
_____________________________________________
Castiga peste 1000 de premii cu Wella Design!
http://wella.boom.ro
More information about the MapServer-users
mailing list