Thanks Kai,<br><br>But I dont have an idea how to write a proxy... do you know where can I find some tips or a generic one?<br><br><div class="gmail_quote">On Wed, Feb 18, 2009 at 8:01 AM, Kai Behncke <span dir="ltr">&lt;<a href="mailto:Kai-Behncke@gmx.de">Kai-Behncke@gmx.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Dear Raphael,<br>
<br>
I &nbsp;had also some problems with the wfs proxy-host.<br>
<br>
In my case it was because I wrote the code of the proxy-host on a Windows-Machine and loaded it on a linux-server, there were some problem with the word wraps then (maby by coincidence you have the same error). I solved it with a dos2unix-compilation at the unix-server.<br>

<div class="Ih2E3d"><br>
<br>
<br>
&gt; I&#39;m starting to think why use Openlayers... this ProxyHost is a really<br>
&gt; bitch.<br>
<br>
<br>
</div>Well, sometimes, at the beginning, OpenLayers is not soooooo easy, but after a while and some steps of learning it really starts to make big fun.<br>
So don`t give up :-)<br>
<br>
Beste regards, Kai<br>
<div><div></div><div class="Wj3C7c"><br>
&gt;<br>
&gt; On Tue, Feb 17, 2009 at 2:25 PM, Arnd Wippermann<br>
&gt; &lt;<a href="mailto:arnd.wippermann@web.de">arnd.wippermann@web.de</a>&gt;wrote:<br>
&gt;<br>
&gt; &gt; &nbsp;Hi,<br>
&gt; &gt;<br>
&gt; &gt; for local addresses you don&#39;t need a proxy host. To be sure, that your<br>
&gt; &gt; local address is used I would use relative path.<br>
&gt; &gt;<br>
&gt; &gt; OpenLayers.ProxyHost=&quot;/cgi-bin/proxy.cgi/?url=&quot;<br>
&gt; &gt;<br>
&gt; &gt; and you can also try to load your WFS with relative path. Then the proxy<br>
&gt; &gt; script is not used. Not 100% sure but only addresses, which begins with<br>
&gt; http<br>
&gt; &gt; , use the proxy script.<br>
&gt; &gt;<br>
&gt; &gt; // Layer WFS<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wfs = new OpenLayers.Layer.WFS(<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Quadras WFS&quot;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;/geoserver/wfs&quot;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {typename: &#39;topp:quadra&#39;},<br>
&gt; &gt;<br>
&gt; &gt; If your WFS is now loaded, then there seems something wrong with your<br>
&gt; proxy<br>
&gt; &gt; script or configuration. If not loaded, copy the WFS request from<br>
&gt; firebug<br>
&gt; &gt; into the address bar of your browser, to be sure that the request send a<br>
&gt; &gt; valid response.<br>
&gt; &gt;<br>
&gt; &gt; Arnd Wippermann<br>
&gt; &gt;<br>
&gt; &gt; &nbsp;------------------------------<br>
&gt; &gt; &nbsp;*Von:* <a href="mailto:users-bounces@openlayers.org">users-bounces@openlayers.org</a><br>
&gt; [mailto:<a href="mailto:users-bounces@openlayers.org">users-bounces@openlayers.org</a>]<br>
&gt; &gt; *Im Auftrag von *Raphael Saldanha<br>
&gt; &gt; *Gesendet:* Dienstag, 17. Februar 2009 02:10<br>
&gt; &gt; *An:* <a href="mailto:users@openlayers.org">users@openlayers.org</a><br>
&gt; &gt; *Betreff:* [OpenLayers-Users] WFS ProxyHost<br>
&gt; &gt;<br>
&gt; &gt; Hi!<br>
&gt; &gt;<br>
&gt; &gt; I&#39;m having some troubles on trying to use WFS...<br>
&gt; &gt;<br>
&gt; &gt; As suggested in the FAQ, and put the proxy.cgi on cgi-bin Apache folder,<br>
&gt; &gt; and add the line &quot;AddHandler python-cgi-script .cgi&quot; on httpd.conf, as<br>
&gt; &gt; suggested in <a href="http://gist.fas.harvard.edu/chgis/?p=14" target="_blank">http://gist.fas.harvard.edu/chgis/?p=14</a>.<br>
&gt; &gt;<br>
&gt; &gt; But loading the following page, I receive the error 1012, on Firebug.<br>
&gt; &gt;<br>
&gt; &gt; Help please!!!<br>
&gt; &gt;<br>
&gt; &gt; &lt;html&gt;<br>
&gt; &gt; &nbsp; &nbsp; &lt;head&gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;title&gt;IPTU&lt;/title&gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;<br>
&gt; &gt; <a href="http://localhost:8080/geoserver/openlayers/theme/default/style.css" target="_blank">http://localhost:8080/geoserver/openlayers/theme/default/style.css</a>&quot;/&gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;!-- Import OpenLayers, reduced, wms read only version --&gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;script src=&quot;<br>
&gt; &gt; <a href="http://localhost:8080/geoserver/openlayers/OpenLayers.js" target="_blank">http://localhost:8080/geoserver/openlayers/OpenLayers.js</a>&quot;<br>
&gt; &gt; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;script defer=&quot;defer&quot; type=&quot;text/javascript&quot;&gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var map;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var quadra;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var imagem;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var wfs;<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OpenLayers.ProxyHost=&quot;<br>
&gt; &gt; <a href="http://localhost:8080/cgi-bin/proxy.cgi/?url=" target="_blank">http://localhost:8080/cgi-bin/proxy.cgi/?url=</a>&quot;;<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // pink tile avoidance<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // make OL compute scale according to WMS spec<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function init(){<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; format = &#39;image/png&#39;;<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var bounds = new OpenLayers.Bounds(<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 497839.91636617144, 7649918.889418672,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 499243.91636617144, 7650565.389418672<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var options = {<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; controls: [],<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; maxExtent: bounds,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; maxResolution: 5.484375,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; projection: &quot;EPSG:32723&quot;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; units: &#39;m&#39;<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; map = new OpenLayers.Map(&#39;map&#39;, options);<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Layer QUADRA<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; quadra = new OpenLayers.Layer.WMS(<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Quadras&quot;, &quot;<a href="http://localhost:8080/geoserver/wms" target="_blank">http://localhost:8080/geoserver/wms</a>&quot;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; layers: &#39;topp:quadra&#39;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transparent: &quot;true&quot;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; format: &quot;image/png&quot;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; srs: &#39;EPSG:32723&#39;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; height: &#39;345&#39;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width: &#39;800&#39;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; styles: &#39;&#39;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tiled: &#39;true&#39;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tilesOrigin :<br>
&gt; &gt; &quot;497839.91636617144,7649918.889418672&quot;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Layer WFS<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wfs = new OpenLayers.Layer.WFS(<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Quadras WFS&quot;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;<a href="http://localhost:8080/geoserver/wfs" target="_blank">http://localhost:8080/geoserver/wfs</a>&quot;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {typename: &#39;topp:quadra&#39;},<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; typename: &#39;quadra&#39;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; featureNS: &#39;<a href="http://www.openplans.org/topp" target="_blank">http://www.openplans.org/topp</a>&#39;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; extractAttributes: false<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //Layer IMAGEM<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; imagem = new OpenLayers.Layer.WMS(<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;WorldView-1&quot;,<br>
&gt; &quot;<a href="http://localhost:8080/geoserver/wms" target="_blank">http://localhost:8080/geoserver/wms</a>&quot;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; layers: &#39;topp:lavras&#39;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; srs: &#39;EPSG:32723&#39;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; height: &#39;345&#39;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width: &#39;800&#39;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; styles: &#39;&#39;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; format: format,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tiled: &#39;true&#39;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tilesOrigin :<br>
&gt; &gt; &quot;497839.91636617144,7649918.889418672&quot;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; map.addLayers([quadra,wfs,imagem]);<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // build up all controls<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; map.addControl(new OpenLayers.Control.PanZoomBar({<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; position: new OpenLayers.Pixel(2, 15)<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }));<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; map.addControl(new OpenLayers.Control.Navigation());<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; map.addControl(new OpenLayers.Control.LayerSwitcher());<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; map.zoomToExtent(bounds);<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/script&gt;<br>
&gt; &gt; &nbsp; &nbsp; &lt;/head&gt;<br>
&gt; &gt; &nbsp; &nbsp; &lt;body onload=&quot;init()&quot;&gt;<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div id=&quot;map&quot;&gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &lt;/body&gt;<br>
&gt; &gt; &lt;/html&gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; Regards,<br>
&gt; &gt;<br>
&gt; &gt; Raphael Saldanha<br>
&gt; &gt; <a href="mailto:saldanha.plangeo@gmail.com">saldanha.plangeo@gmail.com</a><br>
&gt; &gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Atenciosamente,<br>
&gt;<br>
&gt; Raphael Saldanha<br>
&gt; <a href="mailto:saldanha.plangeo@gmail.com">saldanha.plangeo@gmail.com</a><br>
<br>
</div></div><font color="#888888">--<br>
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: <a href="http://www.gmx.net/de/go/multimessenger01" target="_blank">http://www.gmx.net/de/go/multimessenger01</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Atenciosamente,<br><br>Raphael Saldanha<br><a href="mailto:saldanha.plangeo@gmail.com">saldanha.plangeo@gmail.com</a><br>