Help me to Run CGI programs Plz

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

Help me to Run CGI programs Plz

Postby madhusudancs » 03. September 2007 19:41

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
Madhusudan.C.S
madhusudancs
 
Posts: 2
Joined: 03. September 2007 19:36

Postby skuipers » 04. September 2007 07:02

You can find all relevant cgi information here
skuipers
 
Posts: 99
Joined: 21. January 2005 16:27
Location: The Netherlands

skuipers: thank you very much for the prompt reply

Postby madhusudancs » 04. September 2007 18:25

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
madhusudancs
 
Posts: 2
Joined: 03. September 2007 19:36

Postby skuipers » 06. September 2007 15:22

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):
#!/opt/lampp/bin/perl
##
## 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.
skuipers
 
Posts: 99
Joined: 21. January 2005 16:27
Location: The Netherlands


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 9 guests