in reply to Re: mod_perl configuration of Apache2
in thread mod_perl configuration of Apache2
The test code worked well years ago when I used it to set up mod_perl on Debian machines (that also was a pain to get the mod_perl to run).#!/usr/bin/perl -w # FILE: cgi_or_mod-perl.pl use strict; use warnings; use CGI qw(:standard); print header(), start_html ("CGI or mod-perl test"); print "If 'GATEWAY_INTERFACE = CGI/1.1' then regular CGI.<BR>"; print "If 'GATEWAY_INTERFACE - CGI-Perl/1.1' then mod-perl.<BR>"; print "<BR>"; print "========== TESTING ABILITY OF A PERL SCRIPT TO ACCESS ENVIRONME +NT VARIABLES ========<BR>"; print "REMOTE_ADDR = $ENV{REMOTE_ADDR}<BR>"; print "REMOTE_PORT = $ENV{REMOTE_PORT}<BR>"; print "HTTP_REFERER = $ENV{HTTP_REFERER}<BR>"; print "<BR>"; print "========== FULL DUMP OF ENVIRONMENT VARIABLES ==========<BR>"; print map { "$_ = $ENV{$_}<BR>\n"} sort(keys(%ENV)); print "<BR>"; print end_html(); exit (0);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: mod_perl configuration of Apache2
by Bruce32903 (Scribe) on Dec 12, 2009 at 22:22 UTC | |
by gmargo (Hermit) on Dec 13, 2009 at 11:56 UTC | |
by Bruce32903 (Scribe) on Dec 13, 2009 at 12:13 UTC |