[mapserver-users] loadWeb() error on Windows 2003 (MS4W package)

Jeff McKenna jeffmckenna at gmail.com
Sun Feb 17 11:01:16 EST 2008


There were changes in MapServer 5.0 that affects the way certain CGI
variables are passed, which must be affecting the example you are trying.
For a working example in MS4W of CGI MapServer, use the "MapServer Itasca
Demo Application" (
http://www.maptools.org/ms4w/index.phtml?page=downloads.html).

-jeff




>
> I have just started my exploration in Mapserver on Windows platform with
> MS4W package. I am using Bil Kropla's Mapserver book. When I worked out the
> first example (of chapter 2), a simple example using mapserver in CGI-BIN
> mode, I get the following error
>   loadWeb(): Unknown identifier. Parsing error near (c):(line 1)
> I tried changing the path information (TEMPLATE, IMAGE PATH), other
> parameters to ensure the simple 'Hello World' example map gets displayed,
> but I could not go further.
>
> I am producing the source code below of the two files.
>
> File: hello.map
> --------------------
> # This is our "Hello World" mapfile
> NAME "Hello World"
> SIZE 400 300
> IMAGECOLOR 249 245 186
> IMAGETYPE png
> EXTENT -1.0 -1.0 1.0 1.0
> WEB
>     TEMPLATE "c:/ms4w/apache/htdocs/hello.html"
>     IMAGEPATH "c:/ms4w/apache/htdocs/tmp/"
>     IMAGEURL "/tmp/"
> END
> LAYER
>     STATUS default
>     TYPE point
>     FEATURE
>          POINTS  0.00 0.00 END
>          TEXT "Hello World"
>     END # end feature
>     CLASS
>          STYLE
>               COLOR 255 0 0
>          END
>          LABEL
>               TYPE bitmap
>          END
>     END
> END
> END
>
> File: Hello.html
> ---------------------
> <html>
> <head> <title>MapServer Hello World</title></head>
> <body>
>    <form method=POST action="../cgi-bin/mapserv.exe">
>        <input type="submit" value="Click Me">
>        <input type="hidden" name="map"
> value="c:/ms4w/apache/htdocs/hello.map">
>        <input type="hidden" name="map_web_imagepath"
> value="c:/ms4w/apache/htdocs/tmp/">
>    </form>
>    <IMG SRC="[img]" width=400 height=300 border=0>
> </body>
> </html>
>
> Would appreciate any help on this.
>
> Thanks in advance.
> Suresh
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080217/de4719b7/attachment.html


More information about the mapserver-users mailing list