Discussion:
"msLoadMap(): Unable to access file. " Error Loading Map File
Jack Ling
2005-04-01 07:14:59 UTC
Permalink
Hi,


I'm a newbie to MapServer, struggling to setup and try. I managed to
setup the MapServer w/ the expected return from initial install: "No
query information to decode. QUERY_STRING is set, but empty."

I' ve downloaded the demos and put in under Apache's htdocs -> i.e.
htdocs/mapserver_demos folder. When I run the demo i.e. the index page
of /workshop folder, it has the following message: -

msLoadMap(): Unable to access file.
(http://localhost/mapserver_demos/workshop/itasca.map)


All the files are there but I don't know why I can't access?

OS: Windows XP
Webserver: Apache2
Jacob Delfos
2005-04-01 07:23:16 UTC
Permalink
Hi Jack,

Did you set up your permissions for Apache correctly? What statements did you add to your httpd.conf file?
You should check whether the file is accessable. Have you tried to load the url directly (http://localhost/mapserver_demos/workshop/itasca.map)?

Alternatively, change the path of your mapfile to a filepath (e.g. c:\\web\\mapfile.map). Best to use double-backslash with windows.

Regards,

Jacob


JACOB DELFOS
SPATIAL INFORMATION ANALYST
Maunsell Australia Pty Ltd
629 Newcastle Street, WA 6007
PO Box 81, WA 6902
Leederville
Western Australia
ABN 20 093 846 925

Tel + 61 8 9281 6185
Fax + 61 8 9281 6297
***@maunsell.com



-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-***@LISTS.UMN.EDU] On Behalf Of Jack Ling
Sent: 1 April 2005 15:15
To: MAPSERVER-***@LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] "msLoadMap(): Unable to access file. " Error Loading Map File

Hi,


I'm a newbie to MapServer, struggling to setup and try. I managed to
setup the MapServer w/ the expected return from initial install: "No
query information to decode. QUERY_STRING is set, but empty."

I' ve downloaded the demos and put in under Apache's htdocs -> i.e.
htdocs/mapserver_demos folder. When I run the demo i.e. the index page
of /workshop folder, it has the following message: -

msLoadMap(): Unable to access file.
(http://localhost/mapserver_demos/workshop/itasca.map)


All the files are there but I don't know why I can't access?

OS: Windows XP
Webserver: Apache2
Jack Ling
2005-04-01 09:19:36 UTC
Permalink
Hi,

Thanks for your replies.
I still can't get it. I was following example1 of tutorial. Following
is the example1_1.map file (originally, it doesn't even have the
IMAGEPATH"/"IMAGEURL" clause stated. I added accordinly after your
advice).

I've modified httpd.conf as suggested so that I can now point to
/ms_tmp/ or my web server : http://localhost/ms_tmp/. It is fine even
displaying a png format file from there.

How if I put the map file below to /ms_tmp/ and run this:

http://localhost:81/cgi-bin/mapserv.exe?map=http://localhost/ms_tmp/example1_1.map&mode=map

I still got the error:
msLoadMap(): Unable to access file. (http://localhost/ms_tmp/example1-1.map)

I've restarted Apache2 server.

If I followed the suggestion to put absolute path like
http://localhost/cgi-bin/mapserv.exe?map=c:\\temp\\example1-1.map&mode=map
or
http://localhost/cgi-bin/mapserv.exe?map=c:\temp\example1-1.map&mode=map

It will complain: msProcessProjection(): Projection library error. No
such file or directory

your further insidght is appreciated.




MAP
IMAGETYPE PNG
EXTENT 201621.496941 -294488.285333 1425518.020722 498254.511514
SIZE 400 300
SHAPEPATH "data"
IMAGECOLOR 255 255 255


WEB
IMAGEPATH 'C:/Program Files/Apache Group/Apache2/MapServer/ms_tmp/'
IMAGEURL "/ms_tmp/"
END



PROJECTION
"proj=laea"
"ellps=clrk66"
"lat_0=45"
"lon_0=-100"
#
# Alternatively, you can specify an EPSG code.
# "init=epsg:2163"
#
END

# Start of LAYER DEFINITIONS ---------------------------------------------
LAYER # States polygon layer begins here
NAME states
DATA states_ugl
STATUS DEFAULT
TYPE POLYGON

PROJECTION
"init=epsg:4326"
END

CLASS
COLOR 232 232 232
OUTLINECOLOR 32 32 32
END
END # States polygon layer ends here
# End of LAYER DEFINITIONS -------------------------------

END # end of map file/object




---------- Forwarded message ----------
From: R Baud <***@infogeo.ch>
Date: Apr 1, 2005 4:24 PM
Subject: Re: [UMN_MAPSERVER-USERS] "msLoadMap(): Unable to access
file. " Error Loading Map File
To: Jack Ling <***@gmail.com>


Hi,
probably you did not configure this correctly in the .map file:

IMAGEPATH "D:/webdevdata/ms_tmp/"
IMAGEURL "/ms_tmp/"

That the path to the created maps by mapserver. The second is a web
accessible directory defined in apache to reach the created maps.

sample: 11111111.png = map created.
location: D:/webdevdata/ms_tmp/11111111.png
you can access it with your browser at:
Loading Image...

Got it?

But you have to define the directory /ms_tmp/ first in appache:
see your httpd.conf files and add something like this:

Alias /ms_tmp/ "D:/webdevdata/ms_tmp/"

<Directory "D:/webdevdata/ms_tmp/">
AllowOverride None
Options Indexes FollowSymLinks Multiviews
Order allow,deny
Allow from all
</Directory>

that's it.

This said, don't loose your time to configure paths and other things.
Download the latest version of ms4w at www.maptools.org : apache, php,
php-applications are configured.
Try www.cartoweb.org. That's very enhanced too!

Hope this helps.
Rémy

Loading...