Bug 7172 - Omnibus for Plack variable scoping problems
Summary: Omnibus for Plack variable scoping problems
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P1 - high major (vote)
Assignee: Galen Charlton
QA Contact:
URL:
Keywords:
Depends on: 7763 7765 7766 7767 7768 7769 7772 7773 7775 7779 7790 7795 7796 7797 7798 7799 7800 7801 7810 7844 7847 7851 7857 7859 7860 7863 7872 7886 7952 8178 8180 8892 8904 10126 11998 13074 15021 15333 16054 16431 16441 16442 16443 16444 16518 16760 16886 17128 17294 17392 17775
Blocks: 7119
  Show dependency treegraph
 
Reported: 2011-11-06 04:02 UTC by Ian Walls
Modified: 2018-12-03 20:05 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Walls 2011-11-06 04:02:26 UTC
We need to fix up the code throughout the system to be able to handle data faster-than-CGI processors like Plack, FastCGI or mod_perl.  At this time, most of Koha can run okay, but when errors happen, they crash HARD.  Some issues than need attention:

nested subroutines: mod_perl, and I think other systems, turn each script into a subroutine.  If you have subroutines in subroutines (as we do in C4 and some of the scripts), and an inner subroutine modifies a variable declared outside in the outer subroutine, you will get an error "variable will not stay shared".  This can sometimes (always?) be fixed by using "our" instead of "my".  Or using better coding practices :)

memory leaks:  some memory may not be released, so a persistent engine could bloat over time.

other issues may come up, as well.
Comment 1 Dobrica Pavlinusic 2012-03-21 15:11:48 UTC
We started a wiki page at http://wiki.koha-community.org/wiki/Plack
which documents psgi wrappers for opac and intranet along with hints how to deploy using starman
Comment 2 Jon Knight 2018-03-13 16:53:33 UTC
As Plack is now the recommended platform for Koha (as of December 2017) and all the bugs that this bug depend up are resolved in one way or another, can this bug itself be close?
Comment 3 Jonathan Druart 2018-03-23 17:46:30 UTC
Closed.