<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi Alberto, <br><br>I can get the capabilities document, &amp; a list of available layers, using the WMS facility in Quantum GIS, but when I try to access/load the layers as a map the request fails:<br><br>"Response: &lt;HTML&gt;
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;HEAD&gt;&lt;TITLE&gt;MapServer Message&lt;/TITLE&gt;&lt;/HEAD&gt;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;!-- MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=GEOS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE --&gt;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;BODY BGCOLOR="#FFFFFF"&gt;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">msLoadMap(): Unable to access file. (http://173.236.45.118/home/bicimapas/mapdata/BiciMapasMS.map)</p>
<p style="margin: 0px; text-indent: 0px;">&lt;/BODY&gt;&lt;/HTML&gt;"</p><p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;">I suggest that having your mapfile in your home directory tree rather than your webserver's directory tree might be the problem.</p><p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;">You might also try tools like uDIG or QGIS to access the WMS service &amp; debug it before you try to get it working with OpenLayers.</p><p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;">Cheers,</p><p style="margin: 0px; text-indent: 0px;"><br></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&nbsp;&nbsp; Brent Wood<br></p><br><br>--- On <b>Sat, 4/28/12, Alberto Najera <i>&lt;anajera@bicimapas.com.mx&gt;</i></b> wrote:<br><blockquote style="border-left: 2px
 solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Alberto Najera &lt;anajera@bicimapas.com.mx&gt;<br>Subject: RE: [mapserver-users] Open Layers Problem<br>To: mapserver-users@lists.osgeo.org<br>Date: Saturday, April 28, 2012, 11:25 AM<br><br><div class="plainMail">Thanks,<br><br>I used this<br><br><a href="http://173.236.45.118/cgi-bin/mapserv?map=/home/bicimapas/mapdata/BiciMapasM" target="_blank&nbsp;&nbsp;onclick=&quot;return" themainwindow.showlinkwarning(this)"="">http://173.236.45.118/cgi-bin/mapserv?map=/home/bicimapas/mapdata/BiciMapasM</a><br>S.map&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetCapabilities<br><br><br>and now get the capabilities report, which seems to be correct, but still<br>the map does not show with OpenLayers.<br><br>Any ideas?<br><br><br><br><br>Alberto Najera<br>www.bicimapas.com.mx<br>www.bicimapas.com.mx/Empresa.htm<br>Avenida Lomas Verdes No. 58, Local 17<br>Colonia Santa Cruz
 Acatlán<br>Naucalpan, Estado de México<br>México CP 53150<br>Tel: (55) 53 60 30 65<br><a ymailto="mailto:anajera@bicimapas.com.mx" href="/mc/compose?to=anajera@bicimapas.com.mx">anajera@bicimapas.com.mx</a><br>&nbsp;<br>&nbsp;&nbsp;&nbsp;Búscanos como Bicimapas<br>&nbsp;<br><br><br>-----Mensaje original-----<br>De: Havard Tveite [mailto:<a ymailto="mailto:havard.tveite@umb.no" href="/mc/compose?to=havard.tveite@umb.no">havard.tveite@umb.no</a>] <br>Enviado el: viernes, 27 de abril de 2012 06:17 p.m.<br>Para: Alberto Najera<br>Asunto: Re: [mapserver-users] Open Layers Problem<br><br>Try using the complete (absolute) path to the mapfile.<br><br>Håvard<br><br>On 28/04/12 00:48, Alberto Najera wrote:<br>&gt; I tested the WMS capabilities with this string<br>&gt;<br>&gt; <a href="http://173.236.45.118/cgi-bin/mapserv?map=BiciMapasMS.map&amp;SERVICE=WMS&amp;" target="_blank&nbsp;&nbsp;onclick=&quot;return"
 themainwindow.showlinkwarning(this)"="">http://173.236.45.118/cgi-bin/mapserv?map=BiciMapasMS.map&amp;SERVICE=WMS&amp;</a><br>&gt; VERSIO<br>&gt; N=1.1.1&amp;REQUEST=GetCapabilities<br>&gt;<br>&gt; and get this message<br>&gt;<br>&gt; msLoadMap(): Unable to access file. (BiciMapasMS.map)<br>&gt;<br>&gt; Why would the map file not be accessible to openlayers while Mapserver <br>&gt; can access it?&nbsp; Is it a permissions or a path definition problem?<br>&gt;<br>&gt; Any hel os appreciated. Thanks<br>&gt;<br>&gt;<br>&gt; Alberto Najera<br>&gt;<br>&gt;<br>&gt; -----Mensaje original-----<br>&gt; De: <a ymailto="mailto:mapserver-users-bounces@lists.osgeo.org" href="/mc/compose?to=mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a><br>&gt; [mailto:<a ymailto="mailto:mapserver-users-bounces@lists.osgeo.org" href="/mc/compose?to=mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>] En nombre de
 Alberto <br>&gt; Najera Enviado el: viernes, 27 de abril de 2012 01:19 p.m.<br>&gt; Para: <a ymailto="mailto:mapserver-users@lists.osgeo.org" href="/mc/compose?to=mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>&gt; Asunto: [mapserver-users] Open Layers Problem<br>&gt;<br>&gt; Hello<br>&gt;<br>&gt; We have a map that is rendered well using the Mapserver template and <br>&gt; are trying to use it with OpenLayers but are experiencing some <br>&gt; problems as the map does not show and I cannot find why.<br>&gt;<br>&gt; We are using a Linux Centos 5 remote server and the map file is <br>&gt; located in home/bicimapas/mapdata/BiciMapasMS.map and the Mapserver <br>&gt; CGI&nbsp; is located in /home/bicimapas/cgi-bin/mapserv. The IP address is&nbsp; <br>&gt; 173.236.45.118<br>&gt;<br>&gt; On the map file we added this Metadata lines under the WEB section<br>&gt;<br>&gt; METADATA<br>&gt;&nbsp; &nbsp; &nbsp; "wms_title"
 "BiciMapasMS"<br>&gt;&nbsp; &nbsp; &nbsp; "wms_onlineresource"<br>&gt; "<a href="http://173.236.45.118/cgi-bin/mapserv?map=http://173.236.45.118/home/" target="_blank&nbsp;&nbsp;onclick=&quot;return" themainwindow.showlinkwarning(this)"="">http://173.236.45.118/cgi-bin/mapserv?map=http://173.236.45.118/home/</a><br>&gt; bicima<br>&gt; pas/mapdata/BiciMapasMS.map&amp;"<br>&gt;&nbsp; &nbsp; &nbsp; "wms_srs" "EPSG:4326"<br>&gt;&nbsp; &nbsp; &nbsp; "wms_enable_request" "*"<br>&gt;&nbsp; &nbsp; &nbsp; END<br>&gt;<br>&gt;<br>&gt; And the metadata for the test layer was added like this<br>&gt;<br>&gt; LAYER<br>&gt;&nbsp; &nbsp; &nbsp; NAME "areaurbana"<br>&gt;&nbsp; &nbsp; &nbsp; DATA "AreasMS"<br>&gt;&nbsp; &nbsp; &nbsp; STATUS on<br>&gt;&nbsp; &nbsp; &nbsp; TYPE polygon<br>&gt;&nbsp; &nbsp; &nbsp; LABELCACHE on<br>&gt;&nbsp; &nbsp; &nbsp; LABELITEM "NAME"<br>&gt;&nbsp; &nbsp; &nbsp; CLASSITEM "CATEGORY"<br>&gt;&nbsp; &nbsp; &nbsp; METADATA<br>&gt;&nbsp;
 &nbsp; &nbsp; "wms_title" "areaurbana"<br>&gt;&nbsp; &nbsp; &nbsp; "wms_srs" "EPSG:4326"<br>&gt;&nbsp; &nbsp; &nbsp; "wms_include_items" "all"<br>&gt;&nbsp; &nbsp; &nbsp; END<br>&gt; (more code here...........)<br>&gt;<br>&gt; Finally, the code being used to make the Openlayers call is:<br>&gt;<br>&gt; &lt;!DOCTYPE html&gt;<br>&gt; &lt;html lang='en'&gt;<br>&gt; &lt;head&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &lt;meta charset='utf-8' /&gt;<br>&gt; &nbsp;&nbsp;&nbsp; &lt;title&gt;Open Layers Test&lt;/title&gt;&nbsp;&nbsp;&nbsp; <br>&gt;&nbsp; &nbsp; &nbsp; &lt;script type='text/javascript' src="OpenLayers.js"&gt;&lt;/script&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &lt;script type='text/javascript'&gt;<br>&gt;<br>&gt;&nbsp; &nbsp; &nbsp; var map;<br>&gt;<br>&gt; &nbsp;&nbsp;&nbsp; function init() {<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Setup our map object<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; map = new OpenLayers.Map('map_element', {});<br>&gt;<br>&gt;&nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; // Setup our layer objects<br>&gt;<br>&gt; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var layer1 = new OpenLayers.Layer.WMS( 'Area <br>&gt; Urbana','<a href="http://173.236.45.118/cgi-bin/mapserv%27" target="_blank&nbsp;&nbsp;onclick=&quot;return" themainwindow.showlinkwarning(this)"="">http://173.236.45.118/cgi-bin/mapserv'</a>, {layers:<br>'areaurbana',map:<br>&gt; '//173.236.45.118//home/bicimapas/mapdata/BiciMapasMS.map',} );<br>&gt;<br>&gt;<br>&gt;<br>&gt;&nbsp; &nbsp; &nbsp; //Add layers to the map<br>&gt;&nbsp; &nbsp; &nbsp; map.addLayer([layer1]);<br>&gt;<br>&gt;<br>&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Zoom the map to the max extent<br>&gt; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(!map.getCenter()){<br>&gt; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; map.zoomToMaxExtent();<br>&gt; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&gt;&nbsp; &nbsp; &nbsp; }<br>&gt;<br>&gt;&nbsp; &nbsp; &nbsp;
 &lt;/script&gt;<br>&gt; &lt;/head&gt;<br>&gt;<br>&gt; &lt;body onload='init();'&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &lt;div id='map_element' style='width: 500px; height: 500px;'&gt;<br>&gt; &nbsp;&nbsp;&nbsp; &lt;/div&gt;<br>&gt; &lt;/body&gt;<br>&gt; &lt;/html&gt;<br>&gt;<br>&gt; Thanks in advance for your help<br>&gt;<br>&gt; Alberto Najera<br><br>_______________________________________________<br>mapserver-users mailing list<br><a ymailto="mailto:mapserver-users@lists.osgeo.org" href="/mc/compose?to=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></div></blockquote></td></tr></table>