[OpenLayers-Users] WFS Proxy Issue

Christopher Schmidt crschmidt at metacarta.com
Tue Nov 21 10:41:56 EST 2006


On Tue, Nov 21, 2006 at 01:37:31PM -0000, joanne cook wrote:
> Hi All,
>  
> I have been trying to implement a wfs layer in Open Layers 2.2, and am struggling with the proxy settings. Currently this is all working on my local machine, so initially I didn't think I needed any setting for ProxyHost, but the layer simply didn't display (I've checked that it works in a different wfs reader). I then tried to add the line 
>  
> OpenLayers.ProxyHost="/cgi-bin/proxy.cgi?url=";
>  
> (along with adding a proxy.cgi file in my cgi-bin folder) as suggested in previous questions, and on the FAQ. However, I get a popup message telling me that I have an internal server error 500. When I try and go to http://locahost/cgi-bin/proxy.cgi this also sends me to a 500 error page. My apache error log tells me that it 
>  
> "couldn't spawn child process: c:/apache/cgi-bin/proxy.cgi"
>  
> Any other version of the OpenLayers.ProxyHost line seems to give me an unhandled exception error instead. 

The proxy.cgi script that OpenLayers distributes is designed for use on
Linux machines with Python installed. In order to have it work under
Windows, you will probably need to change the first line of the script
to read:

#!c:/Python/python.exe -u

or something similar. 

More information is available on this topic on
http://www.imladris.com/Scripts/PythonForWindows.html -- if you can't
get it working, you might try there for more tips/tricks for setting up
Python CGI under Windows.

Alternatively, you might want to write some other kind of proxy script,
if you have an environment set up for other scripting languages. I don't
know what you might have set up, but you could write a script in PHP,
for example, if you have your system set up to run PHP.

Do you have other scripting support set up already?  Do you have a
preferred programming language? 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list