duncanb7
asked on
CGI concept, Perl, php, c
Dear Expert,
Today I study perl and cgi usage and concept and just want to ask some question after goolge serach some infomation at following link
http://www.htmlcodetutorial.com/forms/index_famsupp_6.html
http://www.whizkidtech.redprince.net/cgi-bin/tutorial
Question-1) I know php , and I am able to run any php program in my Linux server by php command
and I also able to run my php at my IE broswer on XP just typing http://www.mysite.com/example.php
I just want to clarify. Because my hosting company already installed CGI program on my server so that my users and I are able to run perl, php, c language on IE or any browsers through CGI program on my server THe CGI program is handling users(client-side) on browser's request through post and get request and execute
any script program in server such as php, perl, c..etc.
Question-2 CGI program is language program, what type of language is C or others? Could I take
a look of CGI program look like in editor ?
Question-3 Why I don't have cgi-bin directory at my linux server if I am able to run php script on my IE browser? Or it doesn't matter to have cgi-bin directory or not because it is not related to whether I have installed
CGI program or not, and cgi-bin is just directory to store related program or script ?
Quesiton-4, On my Cpanel I got one icon that is cgi center . Is the cgi center means there is a lot of
script program similar to php prgram that can run on any browser for users throught CGI program on server ?
Finally question), people say Perl is out-dated lanauge for web traffice application because today now
they are using php lanauge to replace perl. Is it right ? So I don't need to do starting study on Perl and
so I just need to concentrate on php that is already good enough ? but why I Awstat web stat software is
still using Perl ?
Please advise
Duncan
Today I study perl and cgi usage and concept and just want to ask some question after goolge serach some infomation at following link
http://www.htmlcodetutorial.com/forms/index_famsupp_6.html
http://www.whizkidtech.redprince.net/cgi-bin/tutorial
Question-1) I know php , and I am able to run any php program in my Linux server by php command
and I also able to run my php at my IE broswer on XP just typing http://www.mysite.com/example.php
I just want to clarify. Because my hosting company already installed CGI program on my server so that my users and I are able to run perl, php, c language on IE or any browsers through CGI program on my server THe CGI program is handling users(client-side) on browser's request through post and get request and execute
any script program in server such as php, perl, c..etc.
Question-2 CGI program is language program, what type of language is C or others? Could I take
a look of CGI program look like in editor ?
Question-3 Why I don't have cgi-bin directory at my linux server if I am able to run php script on my IE browser? Or it doesn't matter to have cgi-bin directory or not because it is not related to whether I have installed
CGI program or not, and cgi-bin is just directory to store related program or script ?
Quesiton-4, On my Cpanel I got one icon that is cgi center . Is the cgi center means there is a lot of
script program similar to php prgram that can run on any browser for users throught CGI program on server ?
Finally question), people say Perl is out-dated lanauge for web traffice application because today now
they are using php lanauge to replace perl. Is it right ? So I don't need to do starting study on Perl and
so I just need to concentrate on php that is already good enough ? but why I Awstat web stat software is
still using Perl ?
Please advise
Duncan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Better understanding
Duncan
Duncan
ASKER
Please correct me if it is mistake on what my understand or say as follows
CGI is a method defined by RC3875 to interpret web browser URL to run web server program such
as perl or php and stdout program output data back to wbe browser.
The following printnev.pl is CGI program or script to run perl program and output all
environment varaible. "pl" extentsion of printenv.pl is stand for perl
printenv.pl
==========================
#!/usr/local/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";
}
So last question:
Why I can run my php program on my IE browser when I type for example, www.mysite.com/example.php? Is it because my server already installed CGI program or script
for php program to execute my php program ?