<div dir="ltr"><div>Hi..</div>
<div> </div>
<div>I added the new shapefiles to PostGIS using shp2pgsql etc and it was successful. After that, in my mapfile, I included a new layer for each of these shapefiles. What I copy-pasted in my mail was the layer that I added in my mapfile.</div>
<div> </div>
<div>I have included WMS metadata in the beginning of the mapfile:</div>
<div>WEB<br> IMAGEURL "/tmp/"<br> IMAGEPATH /tmp/ms_tmp/<br> METADATA<br> "wms_title" "MOL" ##required<br> "wms_onlineresource" "....." ##required<br>
"wms_srs" "EPSG:2060" ##recommended<br> END</div>
<div><br>I was getting a good output using WMS request:</div>
<div><a href="http://....../cgi-bin/mapserv?map=/data/..../t....map&SERVICE=WMS&VERSION=1.1.1&REQUEST=getmap&layers=mol&STYLES=&SRS=epsg:2060&FORMAT=image/jpeg&WIDTH=600&HEIGHT=500&BBOX=332271.136,2800048.4565,335043.0915,2803465.287">http://....../cgi-bin/mapserv?map=/data/..../t....map&SERVICE=WMS&VERSION=1.1.1&REQUEST=getmap&layers=mol&STYLES=&SRS=epsg:2060&FORMAT=image/jpeg&WIDTH=600&HEIGHT=500&BBOX=332271.136,2800048.4565,335043.0915,2803465.287</a></div>
<div> </div>
<div>As I kept adding new layers, I suddenly started getting an Internal server error on my browser. When I checked the error log, it read: Premature end of script headers: mapserv.</div>
<div>All the new layers were similar to each other, with only different "NAME" and "DATA". But the internal server error would just not go unless I reduced the total number of layers in my mapfile.</div>
<div> </div>
<div>shp2img works fine and I get an output. What doesnt work is the WMS. Works when I reduce the total number of layers in my mapfile. Is there a maximum number of layers or classes that we can use? I use version 5.0</div>
<div> </div>
<div>After reading the latest reply, I added WMS metadata to the "layers" also, but WMS still doesnt work. </div>
<div> </div>
<div>Please help.</div>
<div>Thanku v much..</div>
<div> </div>
<div>On Sun, Jan 10, 2010 at 2:56 AM, Rahkonen Jukka <span dir="ltr"><<a href="mailto:Jukka.Rahkonen@mmmtike.fi">Jukka.Rahkonen@mmmtike.fi</a>></span> wrote:<br></div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi,<br><br>You talk about adding a shapefile but the layer definitions below are for PostGIS layer. Have you copy-pasted another layer or what? The main problem could be that the layer in your mail is missing entries for WMS metadata. Try reading and following the document at <a href="http://mapserver.org/ogc/wms_server.html" target="_blank">http://mapserver.org/ogc/wms_server.html</a>.<br>
<font color="#888888"><br>-Jukka Rahkonen-<br></font>
<div>
<div></div>
<div class="h5"><br>Shaz N wrote:<br><br>> Hi users..<br><br><br><br>> I have been adding a few new shapefiles to my existing map file. I am a<br>facing a new problem since last evening. I added 9 shapefiles successfully<br>
and could view the map in the browser. While adding the 10th shapefile I got<br>an error. All the new shapefiles are simple point shapefiles.<br><br>Example: LAYER<br><br> NAME 'sc'<br><br> CONNECTIONTYPE postgis<br>
<br> CONNECTION " "<br><br> DATA "the_geom from sc"<br><br> TEMPLATE "dummy.html"<br><br> DEBUG ON<br><br> TYPE POINT<br><br> MAXSCALE 10000<br>
<br> MINSCALE 2000<br><br> STATUS DEFAULT<br><br> LABELITEM "name"<br><br> LABELCACHE ON<br><br><br><br> CLASS<br><br> MAXSCALE 10000<br><br> MINSCALE 2000<br>
<br><br><br> STYLE<br><br> ANTIALIAS TRUE<br><br> SYMBOL "square"<br><br> SIZE 9<br><br> COLOR 153 0 102<br><br> OUTLINECOLOR 255 255 255<br>
<br> END #end style<br><br><br><br> LABEL<br><br> ANGLE auto<br><br> COLOR 153 0 102<br><br> ANTIALIAS TRUE<br><br> FONT vera_sans-bold<br>
<br> TYPE TRUETYPE<br><br> SIZE 9<br><br> POSITION auto<br><br> PARTIALS false<br><br> BUFFER 1<br><br> END #end label<br><br> END#end class<br>
<br>END #end layer<br><br><br><br>This is the error from the error log:<br><br><br><br>Premature end of script headers: mapserv<br><br><br><br>And this is what I got using WMS get map request on the browser:<br><br>Internal Server Error<br>
<br>The server encountered an internal error or misconfiguration and was unable<br>to complete your request.<br><br>Please contact the server administrator, [no address given] and inform them<br>of the time the error occurred, and anything you might have done that may<br>
have caused the error.<br><br>More information about this error may be available in the server error log.<br><br><br><br>I checked the shapefile and map file for errors and couldn't find any. And<br>mapserver has been installed correctly and has been working well. The<br>
problem only arises when I add the extra layer. It works well with all the<br>existing ones.<br><br>The map file works on my PHP map display page but when I try it using WMS it<br>does not work.<br><br><br><br>I use MapServer 5.0.<br>
<br><br><br>Any help would be greatly appreciated.<br><br>Thanks in advance.<br><br></div></div></blockquote></div><br></div>