in reply to How to execute CGI with different extension

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

  • Comment on Re: How to execute CGI with different extension