Discussion:
[UMN_MAPSERVER-USERS] CGI variable "map" is not set
Stephanie Waite
2007-06-08 16:52:58 UTC
Permalink
Hello, I am trying to work on my first simple map, but I keep getting the
following error:

loadMap(): Web application error. CGI variable "map" is not set.

The URL that I type:
http://localhost/cgi-bin/mapserv.exe?%20map=/ms4w/apps/tutorial/htdocs/example1-1.map&layer=states&mode=map

Here is the Example1-1.map
MAP
IMAGETYPE PNG
EXTENT -97.238976 41.619778 -82.122902 49.385620
SIZE 400 300
SHAPEPATH "/ms4w/apps/tutorial/data"
IMAGECOLOR 255 255 255

LAYER
NAME states
DATA states_ugl
STATUS OFF
TYPE POLYGON

CLASS
NAME "The Upper Great Lakes States"

STYLE
COLOR 232 232 232
OUTLINECOLOR 32 32 32
END
END
END

END

Any help would be appreciated to get me started. Thank you!
Gregor Mosheh
2007-06-08 17:01:50 UTC
Permalink
Post by Stephanie Waite
loadMap(): Web application error. CGI variable "map" is not set.
http://localhost/cgi-bin/mapserv.exe?%20map=/ms4w/apps/tutorial/htdocs/example1-1.map&layer=states&mode=map
Yeah, look at the URL. %20 is a space. Get rid of the space and you
should be fine.
Jeff McKenna
2007-06-08 18:40:11 UTC
Permalink
Also, since you are using MS4W, you might want to use the "PHP/MapScript
Sample Application" addon package for MS4W for guidance, since it
out-of-the-box sets up a WMS mapfile for you (see your localhost page
after installing).

jeff
Post by Gregor Mosheh
Post by Stephanie Waite
loadMap(): Web application error. CGI variable "map" is not set.
http://localhost/cgi-bin/mapserv.exe?%20map=/ms4w/apps/tutorial/htdocs/example1-1.map&layer=states&mode=map
Yeah, look at the URL. %20 is a space. Get rid of the space and you
should be fine.
--
Jeff McKenna
DM Solutions Group Inc.
http://www.dmsolutions.ca
Continue reading on narkive:
Loading...