[mapserver-users] Eror in CGI Script
Jeff McKenna
jmckenna at gatewaygeomatics.com
Tue Aug 11 12:35:26 PDT 2009
Rishikant Lal wrote:
> Dear Friends,
> I have my .Map file in C:\ms4w\apps\gmap\htdocs and it is called
> hello.map and my template file is saved in C:\ms4w\Apache\htdocs and is
> hello.html.
> Hello.map looks like
> # This is our "Hello World" mapfile
> NAME "Hello_World"
> SIZE 400 300
> IMAGECOLOR 249 245 186
> IMAGETYPE png
> EXTENT -1.00 -1.00 1.00 1.00
> WEB
> TEMPLATE "/ms4w/Apache/htdocs/hello.html"
> IMAGEPATH "/ms4w/apps/gmap/data"
> IMAGEURL "/ms4w/tmp"
> END
> LAYER
> STATUS default
> TYPE point
> FEATURE
> POINTS 0.0 0.0 END
> TEXT "Hello World"
> END # end feature
> CLASS
> STYLE
> COLOR 255 0 0
> END
> LABEL
> TYPE bitmap
> END
> END
> END
> END
>
> And hello.html looks like
> <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="/ms4w/Apache/htdocs/hello.map">
> <input type="hidden" name="map_web_imagepath"
> value="map=/ms4w/Apache/htdocs/hello.map&mode=map">
> </form>
> <IMG SRC="tmp/abc.png" width=400 height=300 border=0>
> </body>
> </html>
>
> Ther is some error in this script and I am not able to figure it out.
> Kindly help me out.
>
Hello,
Here are my comments:
- MS4W is configured for the following IMAGEPATH and IMAGEURL settings:
IMAGEPATH "/ms4w/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
- you say that your mapfile is in 'C:\ms4w\apps\gmap\htdocs' but your
template points to a mapfile in '/ms4w/Apache/htdocs/hello.map' ?
- maybe keep your mapfile and its associated files (such as your
template) in the same directory so you don't get confused
Hope that helps.
-jeff
--
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/
More information about the MapServer-users
mailing list