Bug 15695 - koha-plack script breaks installations set up before 3.22
Summary: koha-plack script breaks installations set up before 3.22
Status: RESOLVED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-28 18:33 UTC by philippe kloos
Modified: 2023-08-29 00:10 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
the patch for koha-plack script (2.25 KB, patch)
2016-01-28 18:33 UTC, philippe kloos
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description philippe kloos 2016-01-28 18:33:32 UTC
Created attachment 47401 [details] [review]
the patch for koha-plack script

hello,

When running koha-plack --enable, the script assumes that there is already a commented line that includes the plack configuration in the apache virtual host's config of the instance. The script would comment out the line :

(from /usr/sbin/koha-plack line 148) :

           sed -i 's:^\s*#\(\s*Include /etc/koha/apache-shared-opac-plack.conf\)$:\1:' "$instancefile"
           sed -i 's:^\s*#\(\s*Include /etc/koha/apache-shared-intranet-plack.conf\)$:\1:' "$instancefile"

For old fashioned installs there is no commented line that includes plack configuration, so the regular expression doesn't match and the script doesn't enable plack. In my config (we've set up koha 3 years ago) i had to add the plack-related line directly in the apache virtual host config.

Since the included files use the ${instance} variable, i had to define that variable as well in my vhost config :

       Define instance myinstancename

(the "Define" keyword is not well documented in the apache docs ; i used
it because SetEnv didn't work).

Instead of commenting out the (possibibly non-existent) plack related lines, it is possible to find where the "/etc/koha/apache-shared-{opac,intranet}.conf" files are included and add the two relevant lines.
Comment 1 Mirko Tietgen 2016-06-10 11:29:17 UTC
koha-plack does not work for installations set up before 3.22, because the changes never got backported. That means everyone with a setup created before that will break their setup when using koha-plack.

Changed the bug title and added more infos.
Comment 2 Katrin Fischer 2023-08-28 21:02:58 UTC
Given the age of this one - could this be closed?
Comment 3 David Cook 2023-08-29 00:10:07 UTC
(In reply to Katrin Fischer from comment #2)
> Given the age of this one - could this be closed?

I think so