Hi Listers,

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"

Hello.html
<html>
<head><title>MapServer Hello World</title></head>
<body>
        <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"
                        value="/usr/local/apache2/htdocs/">
        <form>
        <IMG SRC="[img]" width=400 height=300 border=0>
</body>
</html>

Hello.map
# This is our "Hello World" maple
NAME "Hello_World"
SIZE 400 300
IMAGECOLOR 249 245 186
IMAGETYPE png
EXTENT -1.00 -1.00 1.00 1.00
WEB
        TEMPLATE "http://192.168.2.12/~andrewlewin/hello.html";
        IMAGEPATH "/usr/local/apache2/htdocs/"
        IMAGEURL "/tmp/"
END

The book suggests that I should Configure MapServer and Apache like this:
shapes:
mkdir /home/mapdata
chown nobody:nobody /home/mapdata
chmod u+rx /home/mapdata

images:
mkdir /var/www/htdocs/tmp
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.

Thanks,

Andrew
 

Andrew Lewin, M.Sc., Adv. Dipl. GIS
President
Spatial-Conserve Inc.
www.spatialconserve.com
Email: ale...@spatialconserve.com
Tel: (905) 639-4646
Mobile: (905) 630-8441
Skype: andrew.lewin99
Follow me on Twitter: www.twitter.com/arlewin




_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to