2019-05-30
Improving mod_perl pages
I saw some parts in a site that were creating errors and trying to maintain old PHP code was an annoyance again. So I set up the project to port it all to mod_perl to be able to support it again. Not an easy project, and it will take a while. First work was on understanding the mod_perl registry which keeps scripts and perl interpreters running in Apache. I noticed I was getting old errors from scripts which is because the mod_perl registry doesn't automatically reload scripts (to save file actions). This is not ideal on a development server and can be confusing on a production server. Solution: enable Apache2::Reload with# enable perl AddHandler perl-script .pl PerlResponseHandler ModPerl::Registry PerlInitHandler Apache2::ReloadNow to write the right perl code...