For all those concerned this is the same topic as brought up in <span style="font-size: larger;">"HostGIS+OpenLayers WMS requests to mapserver problems".<br><br>Sorry for the posts to multiple lists, I have started a new topic in an attempt to focus it to the most appropriate list.
<br><br>Original Post:<br></span>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<br><span style="color: rgb(0, 0, 0);">I originally had an FGS setup installed and my OpenLayers page worked
fine displaying both Google Maps layers and Mapserver layers which were
retrieved by a WMS request.</span><br style="color: rgb(0, 0, 0);"><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">However I have now moved over to HostGIS as a base and the WMS requests have become really strange.
</span><br style="color: rgb(0, 0, 0);"><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">Originally a standard WMS request statement looked like this:</span><br style="color: rgb(0, 0, 0);"><br style="color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0);"><a href="http://192.168.1.130/cgi-bin/mapserv?map=/var/www/mapfiles/mswmsrq.map&service=wms&version=1.1.1&request=getmap&SRS=EPSG:4326&layers=grap,grcad,cadbd,propbd,fmbl,varbl" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://192.168.1.130/cgi-bin/mapserv?map=/var/www/mapfiles/mswmsrq.map&service=wms&version=1.1.1&request=getmap&SRS=EPSG:4326&layers=grap,grcad,cadbd,propbd,fmbl,varbl</a></span><br style="color: rgb(0, 0, 0);">
<br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">However
when running under HostGIS I kept getting mapserv errors and after
satisfying all of the things it was whinging about, I got it to finally
display again using the request shown below:
</span><br style="color: rgb(0, 0, 0);"><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);"><a href="http://192.168.1.130/cgi-bin/mapserv?map=/var/www/mapfiles/mswmsrq.map&service=wms&version=1.1.1&request=getmap&SRS=EPSG:4326&layers=grap,grcad,cadbd,propbd,fmbl,varbl&BBOX=144.841,-34.5838,146.344,-34.0477&format=image/png&width=800&height=600&styles=" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://192.168.1.130/cgi-bin/mapserv?map=/var/www/mapfiles/mswmsrq.map&service=wms&version=1.1.1&request=getmap&SRS=EPSG:4326&layers=grap,grcad,cadbd,propbd,fmbl,varbl&BBOX=144.841,-34.5838,146.344,-34.0477&format=image/png&width=800&height=600&styles=
</a></span><br style="color: rgb(0, 0, 0);"><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">Notice the really strange "styles="</span><br style="color: rgb(0, 0, 0);"><br style="color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0);">Despite
this I cannot get WMS requests out of OpenLayers to work at all, even
adding all of the extra parameters it is asking for.
</span><br style="color: rgb(0, 0, 0);"><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">I have no idea what's going on here, possibly different mapserver settings are present in the HostGIS setup.
</span><br>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<br><br>Anyway to answer some of your questions:<br><span style="font-size: larger;"><br><span style="color: rgb(51, 51, 255);">@Christopher</span><br><br>Once again sorry about the multiple posts, anyway on to the subject at hand:
<br><br></span><span style="color: rgb(51, 51, 255);">A styles parameter is not optional according to the WMS 1.1 spec, nor is</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">it optional in MapServer
5.0. (This is probably the single most</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">"controversial" change in 5.0, and I believe it's going away in 5.0.1.)</span><br><span style="font-size: larger;">
<br>So these parameters have always been required? it was just the case that I was running an older version of mapserver that did not enforce them?<br><br>My mapserver version is 5.0.0, it was in my previous build 4.4.1<br>
<br></span><span style="color: rgb(51, 51, 255);">I don't know what 'work at all' means, you'll need to be more specific.<br><br><span style="color: rgb(0, 0, 0);">With "work at all" I was referring to simply trying to add in the additional parameter in the OpenLayers WMS Layer definition. Since then I have got a Mapserver Layer working, so I guess this narrows the problem down to a WMS issue. Currently my WMS definitions in OL are as follows:
<br><br></span></span><pre id="line17">                var grap = new OpenLayers.Layer.WMS( "Griffith Aerial Photo", <br>                "<a href="http://192.168.1.130/cgi-bin/mapserv?map=/var/www/mapfiles/wms.map">http://192.168.1.130/cgi-bin/mapserv?map=/var/www/mapfiles/wms.map
</a>",<br>                {layers: 'grap', format:"image/png"},<br>                {isBaseLayer: false}<br>                );</pre><br><span style="font-size: larger;"><br><span style="color: rgb(0, 153, 0);">@Gregor</span><br style="color: rgb(0, 153, 0);">
</span><br style="color: rgb(0, 153, 0);"><span style="color: rgb(0, 153, 0);">I don't see your cross-post to the OpenLayers mailing list. Debugging it</span><br style="color: rgb(0, 153, 0);"><span style="color: rgb(0, 153, 0);">
from a OL perspective, I'd ask whether your browser is in fact able to</span><br style="color: rgb(0, 153, 0);"><span style="color: rgb(0, 153, 0);">contact the WMS server to make a WMS request at all -- firewalls and
</span><br style="color: rgb(0, 153, 0);"><span style="color: rgb(0, 153, 0);">DMZs are culprits in that regard, as are "localhost" or private IPs. If</span><br style="color: rgb(0, 153, 0);"><span style="color: rgb(0, 153, 0);">
it can do that, then you'd want to "tail -f" your webserver's access log</span><br style="color: rgb(0, 153, 0);"><span style="color: rgb(0, 153, 0);">and hit reload on your browser's map, and see whether the browser is
</span><br style="color: rgb(0, 153, 0);"><span style="color: rgb(255, 102, 0);"><span style="color: rgb(0, 153, 0);">even trying and what it's trying to do.</span><br><br><span style="color: rgb(0, 0, 0);">I really don't think this should be an issue given that I have tested it on a client and on the server itself and the problem exists on both. Also the exact same setup, just a different OS worked fine about a week ago, I don't believe there are any firewalls of DMZ's between them either.
<br><br>I will however give it some further testing and try check the access log as seeing HostGIS may have some settings that are blocking or as you said to see if it is actually requesting what i want.<br><br>Cheers<br>
<br>Brad<br></span></span>