Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: How can i tell if mod_perl is working?

by kschwab (Priest)
on Sep 01, 2002 at 00:28 UTC ( #194405=note: print w/ replies, xml ) Need Help??


in reply to How can i tell if mod_perl is working?

You could print out your pid.

print "my pid is $$ <br>\n";
I would suspect your pid would be the same as one of the httpd daemons if mod_perl were running correctly.

Update:

Also, from the mod_perl faq:

How can I test that my script is running under mod_perl?

There are 2 environment variables you can test.

exists $ENV{"MOD_PERL"}   # if running under mod_perl

$ENV{"GATEWAY_INTERFACE"} eq "CGI-Perl/1.1"

The MOD_PERL variable gets set immediately when the perl
interpreter starts up, whereas GATEWAY_INTERFACE may not be
set yet when BEGIN blocks are being processed. 


Comment on Re: How can i tell if mod_perl is working?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://194405]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (10)
As of 2015-07-02 23:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (47 votes), past polls