Practical mod_perl / HTML Book / books


previous page: 25.2.1.1. PerlOpenLogsHandlerpage up: HTML Version of the booknext page: 25.2.1.3. PerlChildInitHandler

25.2.1.2. PerlPostConfigHandler


Search







modperlbook.org


 HTML Book


 PDF Book


 Download Code


 Table of Contents


 Errata


 mod_perl2 User's Guide


 Sitemap





Add to Google



Creative Commons License


Written by
Eric Cholet (Logilune)
and Stas Bekman (StasoSphere).

Hosted by ibiblio.org.



The post_config phase happens right after Apache has processed the configuration files, before any child processes are spawned (which happens at the child_init phase).

This phase can be used for initializing things to be shared between all child processes. You can do the same in the startup file, but in the post_config phase you have access to a complete configuration tree.

The post_config phase is very similar to the open_logs phase. The PerlPostConfigHandler directive may appear in the main configuration files and within <VirtualHost> sections. Apache will run all registered handlers for this phase until a handler returns something other than Apache::OK or Apache::DECLINED. This phase's handlers receive the same four arguments as the open_logs phase's handlers. From our example:

sub post_config {
    my($conf_pool, $log_pool, $temp_pool, $s) = @_;
    say("configuration is completed");
    return Apache::OK;
}

This example handler just logs that the configuration was completed and returns right away.

This handler is configured by adding the following to httpd.conf:

PerlPostConfigHandler Book::StartupLog::post_config

 

Continue to:

  • prev: 25.2.1.1. PerlOpenLogsHandler
  • Table of Contents
  • next: 25.2.1.3. PerlChildInitHandler

Tags

mod_perl, modperl, Apache, perl, cgi, html, mod_perl, e-commerce, scalability, free, open source, OSS, apache, squid, high availability, modperl, linux, unix, Web, www, mod_perl, webserver, admin, apache, book, webmaster, tools, modperl, guide, docs, documentation, help, mod_perl, perl, information, apache, script, errata, eric cholet, perl, apache, mod-perl, stas bekman, mod_perl, cool, perl, Apache, performance, speed, choice




Other projects to check out: meta-religion.com is for those interested in Religious, Spiritual and Esoteric Phenomena. i-want-a-better.com is a community of people discussing what they would like to be improved in their lives and things they use and interact with. You may also want to find a healer in your area or read articles on variety of topics.






TOP
previous page: 25.2.1.1. PerlOpenLogsHandlerpage up: HTML Version of the booknext page: 25.2.1.3. PerlChildInitHandler

© 2007 StasoSphere

[ Privacy Policy ] [ Terms of Use ] [ About Authors ] [ Search ]

Last modified Sat Jan 8 19:59:13 2011