<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 &quot;MAP&quot; (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">&lt;<a href="mailto:harpalhira@gmail.com">harpalhira@gmail.com</a>&gt;</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&#39;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>&lt;?php</p>

<p> dl(&quot;php_mapscript.dll&quot;);</p>

<p> $map_path=&quot;C:\OSGeo4W\apache\htdocs/&quot;;</p>

<p>$map = ms_newMapObj($map_path.&quot;hello.map&quot;);</p>

<p>$image=$map-&gt;draw();</p>

<p> $image_url=$image-&gt;saveWebImage();</p>

<p> ?&gt;</p>

<p>&lt;HTML&gt;</p>

<p>&lt;HEAD&gt;</p>

<p>&lt;TITLE&gt;MAPSERVER HELLO WORLD&lt;/TITLE&gt;</p>

<p>&lt;/HEAD&gt;</p>

<p>&lt;BODY&gt;</p>

<p>&lt;IMG SRC=&lt;?php echo $image_url;?&gt;&gt;</p>

<p>&lt;/BODY&gt;</p>

<p>&lt;/HTML&gt;</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>