Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

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.

Replies are listed 'Best First'.
Re: Trapping apache start stop
by arkturuz (Curate) on Jan 15, 2007 at 10:31 UTC
    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 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 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 Khen1950fx (Canon) on Jan 16, 2007 at 05:56 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://594719]
Approved by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2017-12-17 18:14 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (466 votes). Check out past polls.