Page 1 of 1

Help me to Run CGI programs Plz

PostPosted: 03. September 2007 19:41
by madhusudancs
Hi all,
I am a beginner to XAMPP and to the whole world of LAMP itself. I have just now started learning things. I am able to run php programs using XAMPP on Ubuntu. Can someone help me in running CGI and Perl Scripts using XAMPP. I am unable to do it. Can someone plz help me out??

Thanks for the Help in Advance

-- With regards

PostPosted: 04. September 2007 07:02
by skuipers
You can find all relevant cgi information here

skuipers: thank you very much for the prompt reply

PostPosted: 04. September 2007 18:25
by madhusudancs
I am sorry to say that I did all those mentioned in that page but failed. Thats why I posted here. If can someone help me here itself the actual procedure it would be of much help to me. And also I am quite urgent about this, because this is related to my academics also.
Anyhow thanks for the response. And thanks for any future help

PostPosted: 06. September 2007 15:22
by skuipers
OK. Try the following in order to find out where the error resides.

Copy the following module into your cgi-bin directory and name it printenv (don't forget to make it executable):
## printenv -- demo CGI program which just prints its environment

print "Content-type: text/plain\n\n";
foreach $var (sort(keys(%ENV))) {
$val = $ENV{$var};
$val =~ s|\n|\\n|g;
$val =~ s|"|\\"|g;
print "${var}=\"${val}\"\n";

This module works fine in my xampp/cgi-bin environment.

Enter http://yourdomain/cgi-bin/printenv

If you get nothing your xampp config files are incorrect.

If your xampp set-up is correct you should get the environment variables on your screen. In that case there is an error in the other cgi-bin modules you are using.