[mapserver-users] HTML Templates
alewin at spatialconserve.com
Wed Jun 23 14:44:37 EDT 2010
I am trying to learn MapServe as a beginner and I am having lots of trouble with the fundamentals of setting up the program. I am running Mac OSX Snow Leopard with Apache.
According to my httpd-conf file, my document root is /usr/local/apache2/htdocs/ ; however, when I use the tutorial data the files need to be in my root directory i.e. /ws4w/etc... I thought that all the data had to be in the document root. Can someone explain this to me please?
Another problem I am having...I bought the book "Beginning Mapserver: Open Source GIS Development". The first simple example is a "Hello World" example. The program starts off with a "Click Me" botton and a broken image. When you click on the button, it is supposed to show the "Hello World" text. When I click, I get an error like this: "msLoadMap(): Premature End-of-File." Below are the two files that I used for the program"
<head><title>MapServer Hello World</title></head>
<form method=POST action="/cgi-bin/mapserv">
<input type="submit" value="Click Me">
<input type="hidden" name="map" value="/home1/mapdata/Hello.map">
<input type="hidden" name="map-web-imagepath"
<IMG SRC="[img]" width=400 height=300 border=0>
# This is our "Hello World" maple
SIZE 400 300
IMAGECOLOR 249 245 186
EXTENT -1.00 -1.00 1.00 1.00
The book suggests that I should Configure MapServer and Apache like this:
chown nobody:nobody /home/mapdata
chmod u+rx /home/mapdata
chown nobody:nobody /var/www/htdocs/tmp
chmod u+rx /var/www/htdocs/tmp
The problem is that when I try to run these commands, I get a "Permission denied" error. How can I get permission to do this. I remember when I was installing the various components from binaries that there was a command to ask me for my password before I did anything to the directory, but I forgot. Can anyone tell me?
Sorry for posting all this at once. I believe once I figure out these problems I will be able to move on.
Andrew Lewin, M.Sc., Adv. Dipl. GIS
Email: alewin at spatialconserve.com
Tel: (905) 639-4646
Mobile: (905) 630-8441
Follow me on Twitter: www.twitter.com/arlewin
More information about the mapserver-users