Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Trapping apache start stop

by opensourcer (Monk)
on Jan 15, 2007 at 10:11 UTC ( #594719=perlquestion: print w/ replies, xml ) Need Help??
opensourcer has asked for the wisdom of the Perl Monks concerning the following question:

hi, how do i print when apache starts and stop or restarts through mod_perl or using handlers. i have tried by catching the SIG but couldn't get the success. i have seend the PerlChildInit/Exit handler, but they are for child process, here im looking for the apache. I'll be very thankfull if some 1 could guice me.

Comment on Trapping apache start stop
Re: Trapping apache start stop
by arkturuz (Curate) on Jan 15, 2007 at 10:31 UTC
    Hi!
    Are you trying to detect start/stop/restart status via mod_perl executed by the same server you're starting/stoping/restarting? I don't think you can detect stoping the server via application that same server enables to run :-)
    You can read the apache log files, though.
Re: Trapping apache start stop
by jesuashok (Curate) on Jan 15, 2007 at 10:35 UTC
    you could see the details in the log file, then why do you want to print it separately ?
Re: Trapping apache start stop
by pajout (Curate) on Jan 15, 2007 at 13:38 UTC
    The Apache (re)starting can be very easy - put the
    <Perl> #your code </Perl>
    section into your httpd.conf, or use PerlPostConfigHandler. The Apache stopping - I have no clear idea.
Re: Trapping apache start stop
by Khen1950fx (Canon) on Jan 16, 2007 at 05:56 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (11)
As of 2014-11-26 13:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (171 votes), past polls