[mapserver-users] Σχετ: Σχετ: Mapserver can't read mapfile

Lars Lingner gislars+list at googlemail.com
Mon Feb 10 08:35:02 PST 2014


Hi Stefanos,

thanks for the mapfile.

Here are some points I would check:

- you habe MAP two times in your file (might be ok, though)
- you don't have a projecten defined
In which projection are your data?

The white color you "see" in your browser come from the IMAGECOLOR. So
MapServer is actually creating a image without objects rendered.

I would enable the debugging to check in the logfile whether MapServer
is getting any data out of your data source.
If this is not the case than you need to check your GetMap request if
the srs and bbox is matching your data source projection.

You also defined the EXTENT with  -5.00 0.00 0.00 5.00. Is this the
correct extent of your source data?

Lars with the help of Jörg :)

On 10.02.2014 17:10, Stefanos Anastasiou wrote:
> Yeah sorry... I guess you're right.  This is my mapfile: 
> 
> MAP
> NAME Peloponisos
> MAP
> UNITS dd
> SIZE 640 480
> IMAGECOLOR 255 255 255
> IMAGETYPE png
> SHAPEPATH "/home/mapdata/data"
> EXTENT -5.00 0.00 0.00 5.00
> 
> WEB 
>     TEMPLATE '/usr/local/apache2/htdocs/pelop.html'
>     IMAGEPATH '/usr/local/apache2/htdocs/tmp'
>     IMAGEURL '/tmp/'
> END
> 
> LAYER
>    NAME 'geodata'
>    DATA "aisthitika_dash"
>    STATUS default
>    TYPE polygon
>    LABELCACHE on
>    LABELITEM 'TEXTSTRING'
>    CLASS
>        NAME "Dasi"
>        STYLE
>           COLOR 212 192 100
>        END
>        LABEL
>           COLOR 0 0 0
>           SIZE small
>        END #Label
>   END #Class
> END #layer
> END #mapfile
> 
> 
> Στις 6:00 μ.μ. Δευτέρα, 10 Φεβρουαρίου 2014, ο/η "Fawcett, David (MNIT)"
> <David.Fawcett at state.mn.us> έγραψε:
> To further diagnose this, it would be useful to see the contents of you
> mapfile.  If no errors are being thrown, it is quite possible that there
> is an issue with spatial reference systems, bounding boxes, or class
> expressions. 
>  
> David.
>  
> *From:*mapserver-users-bounces at lists.osgeo.org
> [mailto:mapserver-users-bounces at lists.osgeo.org] *On Behalf Of *Stefanos
> Anastasiou
> *Sent:* Monday, February 10, 2014 9:50 AM
> *To:* jt at mapmedia.de; mapserver-users at lists.osgeo.org
> *Subject:* [mapserver-users] Σχετ: Mapserver can't read mapfile
>  
> Sorry fellows...  indeed there is a typo but in this e-mail... I checked
> my files again and they seem correct... 
>  
> If I type on my browser:
>  http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.map&mode=map 
>  all I get is a blank page. The data folder has full permissions:
>  drwxrwxrwx 
>  
> All other shapefiles are working correctly but yesterday I just added
> two more in the folder and all I get is a blank screen...     (?)
>  
>  
> Στις 5:37 μ.μ. Δευτέρα, 10 Φεβρουαρίου 2014, ο/η Jörg Thomsen
> <jt at mapmedia.de <mailto:jt at mapmedia.de>> έγραψε:
> Hi,
> 
> please have a look at your path:
>> http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.map
> and
>> http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop/map
> 
> I guess the first one is correct and that's why you get the error-msg
> with the 2nd one. So, what exactly is the result of the request
> http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.map&mode=map ?
> it sounds like a white image, not nothing. In this case you should check
> the bboxes and srs first.
> 
> regards, Jörg
> 
> Am 10.02.2014 16:15, schrieb Stefanos Anastasiou:
>> Hello!!
>> 
>> I'am having my mapfile place in /home/mapdata folder whereas I also keep
>> a couple of other mapfiles too. 
>> I'm trying to load it in the following form on the
>> browser: http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.map&mode=map
>> 
>> and all I get is a blank page. No errors no nothing. 
>> 
>> Then I created an html template in order to click it from there by
>> creating a simple link (and not a from) in the following hyperlink:  <a
>> href="http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop/map&mode=map>
>> This link </a>
>> 
>> And I get the following error: msLoadMap(): Unable to access file.  
>> 
>> Last time this happened I was invoking Mapserver through a form but this
>> time it's just a simple link. 
>> 
>> Why is it happening ? 
>> 
>> The weird thing is that all the other mapfiles that are seem to be
>> working are are having the same permission settings with the
>> current: -rw-r--r-- 
>> 
>> Thanks a lot! 
> 
>> 
>> 
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org <mailto:mapserver-users at lists.osgeo.org>
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>> 
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org <mailto:mapserver-users at lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 
> 
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 



More information about the mapserver-users mailing list