[OpenLayers-Users] Can't get the WFS running

andreia farrér andreia.farrer at gmail.com
Tue Aug 10 08:38:32 EDT 2010


Alex,
many thanks for pointing me at the right direction!
But unfortunately I'm stuck again as I'm a complete beginner concerning this
"proxy-stuff".

I saved the proxy.cgi-file into my .../apache/cgi-bin folder and added '
http://localhost' to the allowedHosts-array. Also I added the following line
to my html-file:

>  OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";
>
> But if I go to http://localhost/cgi-bin/proxy.cgi I'm getting the
following error message:

> Internal Server Error
>
> The server encountered an internal error or misconfiguration and was unable
> to complete your request.
>
> Please contact the server administrator, andreia.farrer at gmail.com and
> inform them of the time the error occurred, and anything you might have done
> that may have caused the error.
>
> More information about this error may be available in the server error log.
>

What have I done wrong?

Btw, the server log looks like this (which looks cryptic to me):

> [Tue Aug 10 14:11:48 2010] [error] [client 127.0.0.1] C:/##BTH10##/5.
> Software/Apache2.2/cgi-bin/proxy.cgi is not executable; ensure interpreted
> scripts have "#!" first line
> [Tue Aug 10 14:11:48 2010] [error] [client 127.0.0.1] (9)Bad file
> descriptor: don't know how to spawn child process: C:/##BTH10##/5.
> Software/Apache2.2/cgi-bin/proxy.cgi
> [Tue Aug 10 14:15:15 2010] [error] [client 127.0.0.1] File does not exist:
> C:/##BTH10##/5. Software/Apache2.2/htdocs/announce
> [Tue Aug 10 14:15:16 2010] [error] [client 127.0.0.1] File does not exist:
> C:/##BTH10##/5. Software/Apache2.2/htdocs/announce
>

Do you know how to fix this?
Cheers
Andreia



2010/8/10 Adam Ratcliffe <adam at prema.co.nz>

> You're probably not proxying your XHR requests so the WFS requests are
> being blocked by the browser's security model.
>
> You can find out how to configure a proxy here:
> http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#WhydoIneedaProxyHost
>
> Cheers
> Adam
>
>   On 10/08/2010, at 10:37 PM, andreia farrér wrote:
>
>   Hello there,
> I'm trying to implement a Web Feature Service in my Map and somehow it
> seems that I'm not able to handle such an "easy" task.
> A few infos first:
> - PosgreSQL/PostGIS installed locally; 3 Tables (ogm_points, ogm_lines,
> ogm_polygons)
> - Geoserver installed locally and WFS-function turned on
> - html-page with OL-Code on Apache-Server
>
> Problem: The features don't show in my mappanel. Although I'm able to read
> the features with e.g Gaia without any problems (and QGIS as a WMS), It
> seems that i missed something. I tried to adapt some examples, but not a
> single one worked.
>
> Code-snippet for the WFS:
>
> var ogm_polygons = new OpenLayers.Layer.Vector("polygons", {
>>                 strategies: [new OpenLayers.Strategy.Fixed(),
>> saveStrategy],
>>                 protocol: new OpenLayers.Protocol.WFS({
>>                     url: "http://localhost:8090/geoserver/wfs",
>>                     version: "1.1.0",
>>                     featureType: "ogm_polygons",
>>                     featureNS: "http://opengeomap.org",
>>                     geometryName: "the_geom",
>>                     srsName: "EPSG:21781" //Swiss LV03
>>                 })
>>             });
>> map.addLayers([ogm_polygons]);
>>
>
> I'd be grateful for any advice on what I'm doing wrong; thanks in advance!
> Greetings
> A. Farrér
>
> --
> Andreia Farrér, Birmensdorferstr. 260, 8055 Zürich; phone: +41 78 825 44 93
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
>


-- 
Andreia Farrér, Birmensdorferstr. 260, 8055 Zürich; phone: +41 78 825 44 93
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100810/dc3f12e8/attachment.html


More information about the Users mailing list