1

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.

2

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.

0
1

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...

5
  • 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 http://127.0.0.1/resources/cgi-bin/proxy.php you get syntax error, Line 1 Column 1 about xml parsing error... use this http://127.0.0.1/resources/cgi-bin/proxy.php?url=http//....
    – Aragon
    Jul 10 '12 at 8:05
  • Either case, it brings XML parsing issue.
    – okello
    Jul 10 '12 at 9:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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