I'm working on a project that has been running as CGI on Netscape and
IIS. We were told to port to mod_perl on Apache. Now it seems we must
also run on CGI on IIS and on Apache: three platforms total.

Testing $ENV{'GATEWAY_INTERFACE'} allows us to detect CGI, but
(correct me if I'm wrong) not whether that CGI is on Apache or IIS.
What I'd like to know is the "right way" to test, from within a script,

* whether one is running under mod_perl? Currently we're doing

> if($ENV{'GATEWAY_INTERFACE'} =~ /^CGI-Perl\//) {
>       $MOD_PERL = 1;
> } else {
>       $MOD_PERL = 0;
> }

* whether one is running under IIS?

Please reply directly to me as well as the list/group (I subscribe the
digest), and TIA, [EMAIL PROTECTED] 

Reply via email to