Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've downloaded sample proxy.cgi file from here. I've placed it in Apache's cgi-bin directory. However, whenever I try to access it, it throws the error Can't find string terminator '"' anywhere before EOF at C:/dev_/dev_php/sws/xampp/cgi-bin/proxy.cgi line 80.\r. I'm using MS Windows and I've updated the first line of the CGI file to reflect my settings, i.e., to #!"C:\dev_\dev_php\sws\xampp\perl\bin\perl.exe".

All the cgi files in the same directory execute fine. Is it that I'm using an outdated proxy file? I'm using Apache 2.2.21.

share|improve this question
up vote 2 down vote accepted

In this case it is because your sample proxy script from Open Layers is written in Python. Changing the header line just changes the language that your cgi file tells the server that it's in. You either need to modify your apache server to run Python (see here for one method) or alternately download a Perl proxy and modify it for your purposes, for example the James Marshall CGI Proxy.

share|improve this answer
Thanks. This is logical. – okello Jul 10 '12 at 9:22

Sometimes I'm having such problems to setup proxy.cgi to another computers. if finding out why really make you tired, i want to advice you to use proxy.php.

you can get it from here. it works similar to proxy.cgi

i hope it helps you...

share|improve this answer
Thanks for the pointer. I'm guessing that I'm to put in my app home. Whenever I access it spits out some XML Parsing Error: syntax error. Any idea how to fix this? – okello Jul 10 '12 at 7:46
which column or line do u take this error? – Aragon Jul 10 '12 at 7:52
Line 1 Column 1. – okello Jul 10 '12 at 7:58
@okello if u directly write you get syntax error, Line 1 Column 1 about xml parsing error... use this – Aragon Jul 10 '12 at 8:05
Either case, it brings XML parsing issue. – okello Jul 10 '12 at 9:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.