[mapserver-users] MapServer Error]: msLoadMap()

Michael Shishcu micklesh at gmail.com
Tue Sep 15 00:24:41 PDT 2009


>
> Hi
>

Seems you are using mapserver 5.4
In your MAP-file the first word (except for comments) must be "MAP" (see the
error message)
also,  can you post here contents of the map-file...

Regards,
michael

2009/9/15 harpal singh <harpalhira at gmail.com>

> I am new to map servers… I have written my first program …..and I am having
> problem ……I have written a simple hello world programon windows and it is
> showing problems……
>
> Error is ------------------
> *Warning*: [MapServer Error]: msLoadMap(): First token must be MAP, this
> doesn't look like a mapfile. in *C:\OSGeo4W\apache\htdocs\hello.php* on
> line *6*
>
> *Warning*: Failed to open map file C:\OSGeo4W\apache\htdocs/hello.map in *
> C:\OSGeo4W\apache\htdocs\hello.php* on line *6*
>
> *Fatal error*: Call to a member function draw() on a non-object in *
> C:\OSGeo4W\apache\htdocs\hello.php* on line *8*
>
> I have tried so much but it is not sorted out ….. plz help me in doing so
> …….. thanx in advance …
>
>
>
>
>
> The code is
>
> <?php
>
>  dl("php_mapscript.dll");
>
>  $map_path="C:\OSGeo4W\apache\htdocs/";
>
> $map = ms_newMapObj($map_path."hello.map");
>
> $image=$map->draw();
>
>  $image_url=$image->saveWebImage();
>
>  ?>
>
> <HTML>
>
> <HEAD>
>
> <TITLE>MAPSERVER HELLO WORLD</TITLE>
>
> </HEAD>
>
> <BODY>
>
> <IMG SRC=<?php echo $image_url;?>>
>
> </BODY>
>
> </HTML>
>
>  The hello.map file is in the C:\OSGeo4W\apache\htdocs directory ……. And
> the hello.php file is also in the same directory.
> Plz help me I will be greatful to u
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090915/5c8b047c/attachment.htm>


More information about the MapServer-users mailing list