Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'ImprAppController::load_scripts' was given in /home/content/50/6390250/html/wp-includes/plugin.php on line 405

Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'ImprAppController::load_styles' was given in /home/content/50/6390250/html/wp-includes/plugin.php on line 405
RSS
 

mod_perl and PerlChildInitHandler

25 Aug

mod_perl provides a number of server lifecycle handlers, which allow you to hook various parts of the initiation sequence to log configuration files or logging before Apache starts handling your individual requests. Unfortunately, for reasons still not clear, when I tried to run initialization in the PerlChildInitHandler, it would correctly initialize but then the values would get re-initialized back to defaults when the PerlReponseHandler fired.

The solution, and not all that satisfying, was to switch to the PerlPostConfigHandler, which did not suffer from that problem and has the added benefit of using shared memory across the multiple processes.

PerlModule Handler
PerlModule Apache2::Reload
PerlOpenLogsHandler Handler::open_logs
PerlPostConfigHandler Handler::post_config
PerlSetVar ReloadDirectories ¨/mnt/hgfs/src/api/lib¨
<Location /event>
   SetHandler modperl   
   PerlResponseHandler Handler::handler
   PerlInitHandler Apache2::Reload
</Location>
 
2 Comments

Posted in devel

 

Leave a Reply

 
 
  1. John

    September 11, 2010 at 1:01 am

    hey, nice blog…really like it and added to bookmarks. keep up with good work

     
  2. James

    September 11, 2010 at 3:18 am

    hey there, this might be little offtopic, but i am hosting my site on hostgator and they will suspend my hosting in 4days, so i would like to ask you which hosting do you use or recommend?

     
 
Info about our use of ads