<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">Hi<br></blockquote><div><br>Seems you are using mapserver 5.4<br>In your MAP-file the first word (except for comments) must be "MAP" (see the error message)<br>
also, can you post here contents of the map-file...<br><br>Regards,<br>michael<br><br></div><div class="gmail_quote">2009/9/15 harpal singh <span dir="ltr"><<a href="mailto:harpalhira@gmail.com">harpalhira@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<p>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……</p>
<p>Error is ------------------<br>
<b>Warning</b>: [MapServer Error]: msLoadMap(): First token must be MAP, this
doesn't look like a mapfile. in <b>C:\OSGeo4W\apache\htdocs\hello.php</b> on
line <b>6</b><br>
<br>
<b>Warning</b>: Failed to open map file C:\OSGeo4W\apache\htdocs/hello.map in <b>C:\OSGeo4W\apache\htdocs\hello.php</b>
on line <b>6</b><br>
<br>
<b>Fatal error</b>: Call to a member function draw() on a non-object in <b>C:\OSGeo4W\apache\htdocs\hello.php</b>
on line <b>8</b> </p>
<p>I have tried so much but it is not sorted out ….. plz help
me in doing so …….. thanx in advance …</p>
<p> </p>
<p> </p>
<p>The code is </p>
<p><?php</p>
<p> dl("php_mapscript.dll");</p>
<p> $map_path="C:\OSGeo4W\apache\htdocs/";</p>
<p>$map = ms_newMapObj($map_path."hello.map");</p>
<p>$image=$map->draw();</p>
<p> $image_url=$image->saveWebImage();</p>
<p> ?></p>
<p><HTML></p>
<p><HEAD></p>
<p><TITLE>MAPSERVER HELLO WORLD</TITLE></p>
<p></HEAD></p>
<p><BODY></p>
<p><IMG SRC=<?php echo $image_url;?>></p>
<p></BODY></p>
<p></HTML></p>
<p> The hello.map file is in the C:\OSGeo4W\apache\htdocs
directory ……. And the hello.php file is also in the same directory.</p>
<span style="font-size: 11pt;">Plz
help me I will be greatful to u</span>
<br>_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
<br></blockquote></div><br>