[OpenLayers-Users] WFS Proxy Issue
joanne cook
j.cook at oxfordarch.co.uk
Tue Nov 21 11:27:51 EST 2006
Hi Christopher,
Many thanks for the pointer there! The instructions below have worked up to a point, except that I can only seem to get a response if my proxy.cgi is actually called proxy.py, despite adding the appropriate lines in my apache httpd.conf file to use python for cgi. I ended up following these instructions here:
http://www.python.org/infogami-faq/windows/how-do-i-use-python-for-cgi/
If I now go to http://localhost/cgi-bin/proxy.py I get to the OpenLayers homepage. However, having modified my Map page to set OpenLayers.ProxyHost = "/cgi-bin/proxy.py?url="
I now get an error message that says "Unhandled Request Return Bad Gateway".
Any thoughts?
Thanks
Jo
-------------------------------------------
Joanne Cook BSc MLitt AIFA MBCS
Information Systems Coordinator
Oxford Archaeology North
-------------------------------------------
________________________________
From: Christopher Schmidt [mailto:crschmidt at metacarta.com]
Sent: Tue 21/11/2006 15:41
To: joanne cook
Cc: users at openlayers.org
Subject: Re: [OpenLayers-Users] WFS Proxy Issue
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
This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com
More information about the Users
mailing list