Help with cgiproxy

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Help with cgiproxy

Postby thedd » 24. November 2007 05:34

Hi all.
I have been using XamppLite with php for a while now and everything has been working fine. I am a noob at cgi though.

Recently, I was trying to install a script called cgiproxy.
Website - http://www.jmarshall.com/tools/cgiproxy/
Script source - http://www.jmarshall.com/tools/cgiproxy/nph-proxy.cgi.txt

I know perl is working because the perltest.cgi that came preinstalled in cgi-bin works.
I saved the nph-proxy.cgi in the cgi-bin folder and tried running it. At first I was getting an error:
Code: Select all
Error message:
couldn't create child process: 720003: nph-proxy.cgi

I soon found out that was because of the first line
Code: Select all
#!/usr/local/bin/perl

which I changed to...

#!"\xampp\perl\bin\perl.exe"


Thats the only edit I made. Now there is no error message at all...Only a blank screen. I will point out that this is an nph-type cgi which I read should work fine in apache with the filename beginning with nph-...which it is [nph-proxy.cgi].

However, maybe there is some setting in apache or the script itself that needs to be set for nph files. That's why I'm here. Is anyone familiar with the cgiproxy script or experienced with cgi and could get this working?

Please help me here.
Regards
Tom.
thedd
 
Posts: 2
Joined: 24. November 2007 05:12

Postby Izzy » 24. November 2007 08:29

Are you still using the XAMPP Lite version?

If so then you should move up to the full version and also install the full Perl addon (Active Perl) to reap the full benefit of what XAMPP and Perl have to offer - read the warning re the version of Apache that is not compatible with mod_perl (win32) if you intend using it:
http://www.apachefriends.org/en/xampp-windows.html

The Lite version is as it suggests - lite on everything.

There is no special configuration to have non parsed header (nph-) named files recognized.

I found this which shows a method to install the proxy you mention but using stand alone components that are all automagically installed and configured in XAMPP.
http://www.techmartini.com/2007/09/03/c ... y-website/

I just downloaded and installed CGIProxy 2.1 beta15 without issues after changing the shebang to reflect my perl path:
#!"C:\xampp\perl\bin\perl.exe"

I have XAMPP 1.6.3a with the full Perl Addon and mod_perl - which helps this script overcome some performance issues if they arise with heavy use - see installation instructions and the scripts readme file.

I installed it into one of my virtual hosts - rocky.silk.com that had this line as part of the host container configuration as do all my virtual hosts:
ScriptAlias /cgi-bin/ "C:/xampp/home/rocky/public_html/cgi-bin/"

I called the script from this address:
http://rocky.silk.com/cgi-bin/nph-proxy.cgi

It went straight to the CGIProxy page for entering your browsing details.

If you have a firewall then you may have to allow the perl interpreter to be contacted from the Internet and visa versa - my firewall asked:
Perl Command Line Interpreter (perl.exe) is being contacted from a remote machine blahblah.com (ip.ip.ip.ip) using port nnnn. Do you want to allow this program to access the network?
And asks again for the return direction.

So to conclude it worked 'straight out of the box" without issue.
Good luck!



===========================================
1. The new DeskTopXampp Launch Control for XAMPP / XAMPPlite
Posted by Ridgewood available from Ridgewood'sDTX web site

2. Build Rich AJAX Applications - Faster
TIBCO General Interface Pro Edition but FREE and Open Source
Fully working with NO donations required to get a user/password
===========================================
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby thedd » 26. November 2007 01:49

Thanks Sooo Much for your help Izzy.

I downloaded the perl addon and was able to install it within xampplite and now the script works perfectly.

I can't believe I didnt see mod_perl on the downloads page before.
thedd
 
Posts: 2
Joined: 24. November 2007 05:12


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 87 guests