manishrathi has asked for the wisdom of the Perl Monks concerning the following question:
I have configured Perl in Path variable. I have testHTML.pl as Perl script in cgi-bin directory, so when an HTTP request comes in for testHTML.pl, this script will be executed and resulting output will be sent to browser. Instead of Perl, if I want to use pHp or Java language, I can use it, right ?
All I need to do is, set up jvm in the Path variable and in the cgi-bin directory, I need to put java byte code. For this example it will be testHTML.class. Now when request comes in for testHTML.class, this will be executed on server and resulting HTML page will be sent to broiwser.
What happens if I create a script with .cgi extension ? Say this is pHp scriopt created with .cgi extension. How does the server know, what language is this script creatres in and how to execute this script ? If I have two scripts both having .cgi extension. One is created using Perl script and other using pHp. How does server understand how to execute these scripts when a request comes in for these scripts ?
thanks
Re: How to execute CGI with different extension
by Anonymous Monk on Dec 06, 2010 at 00:07 UTC
|
Instead of Perl, if I want to use pHp or Java language, I can use it, right ?
How are we to know what abilities you have?
All I need to do is, set up jvm in the Path variable and in the cgi-bin directory, I need to put java byte code. For this example it will be testHTML.class. Now when request comes in for testHTML.class, this will be executed on server and resulting HTML page will be sent to broiwser.
What happens if I create a script with .cgi extension ? Say this is pHp scriopt created with .cgi extension. How does the server know, what language is this script creatres in and how to execute this script ? If I have two scripts both having .cgi extension. One is created using Perl script and other using pHp. How does server understand how to execute these scripts when a request comes in for these scripts ?
See
Shebang, Path variable, EXE
Mostly its a matter of configuring your webserver/os | [reply] |
|