[Ottawa_users] Re: Sebastian's Mapserv Question
Jeff McKenna
jmckenna at gatewaygeomatics.com
Mon Jul 7 09:31:50 EDT 2008
On 6-Jul-08, at 6:11 PM, Sebastian Pawlak wrote:
> Hi Jeff,
>
> Before I wrote this I decided to try everything once again to see if
> I could fix the problem.
> I installed the ms4w package on windows xp on the root of my drive.
> Next I configured the httpd configuration file's document root and
> server root to: "c:\ms4w\Apache\htdocs". Thats all I did with my
> ms4w package. Then I wrote my hello.map and index.html pages as
> follows:
>
> <html>
> <head><title>Hello Map</title></head>
> <body>
> <form method=POST action="\cgi-bin\mapserv">
> <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>
>
>
> #This is our "hello world Map File
> NAME "HELLO WORLD"
> SIZE 400 300
> IMAGECOLOR 249 245 186
> IMAGETYPE png
> EXTENT -1.00 -1.00 1.00 1.00
> WEB
> TEMPLATE "C:\ms4w\Apache\htdocs\index.html"
> IMAGEPATH "C:\ms4w\Apache\htdocs\TMP\"
> IMAGEURL "\TMP\"
> END
> LAYER
> STATUS default
> TYPE point
> FEATURE
> POINTS 0.0 0.0 END
> TEXT "hello"
> END
> CLASS
> STYLE
> COLOR 255 0 0
> END
> LABEL
> TYPE bitmap
> END
> END
> END
> END
>
> I didn't get a prompt this time asking me to download mapserv so I
> guess some progress has been made here.
> Do you have any tips here? I'm really stuck!
>
> Thanks,
> Sebastian
Sebastian,
MS4W comes configured with an Apache that is ready to run on any drive
root, so you should not be editing Apache's httpd.conf file (if you
have either undo or extract a fresh copy of MS4W). Once you have
extracted a fresh MS4W, you can go to 127.0.0.1 in your browser and
click on the various links on that page, showing you that MapServer
and Apache are installed properly on your machine.
Now, for any application that you want to run with your MS4W
installation, you should use the following settings in your MapServer
applications:
IMAGEPATH "/ms4w/tmp/ms_tmp/"
IMAGEURL "/ms_tmp"
Normal practice for MS4W is that all applications live in the /ms4w/
apps/ directory. You can then add Apache aliases to your
application's directory in the /ms4w/httpd.d directory. The easiest
way to see how this is all setup is to download an add-on package from
that MS4W download page (such as the "PHP/MapScript Sample
Application" package), refresh your Apache, and go back to the
127.0.0.1 page and look for a new link at the bottom of the
page...then you can see how that package sets Apache aliases etc.
Unfortunately this is different instructions than your book, but the
good news is that most of the configuration that that book asks you to
do is already done for you with MS4W.
This is all explained in detail in the MS4W README, which you have in
your /ms4w folder, or it is also online: http://www.maptools.org/ms4w/index.phtml?page=README_INSTALL.html)
Also, MS4W has its own mailing list for configuration questions, if
you get stuck..... subscribe at: http://lists.maptools.org/mailman/listinfo/ms4w-users)
have fun!
---
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/ottawa_users/attachments/20080707/5f401009/attachment.html
More information about the Ottawa_users
mailing list