[Koha-bugs] [Bug 17342] Plack does not work after upgrading to 3.22.11

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Sep 24 01:13:56 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17342

Andreas Jonsson <andreas.jonsson at kreablo.se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andreas.jonsson at kreablo.se

--- Comment #1 from Andreas Jonsson <andreas.jonsson at kreablo.se> ---
The same problem is in koha 16.05.04 using the debian packages.

The problem is that the memcached configuration variables are extracted from
the apache configuration file incorrectly so you get  '"127.0.0.1:11211"'
including double quotes as the servers parameter to memcached.  The below patch
for koha-functions.sh fixes the problem.

It is not nice to extract configuration from the apache configuration files
like this.  I would prefer if the memcached configuration was moved to the koha
configuration file.

diff --git a/debian/scripts/koha-functions.sh
b/debian/scripts/koha-functions.sh
index b6f1203..1e1d209 100755
--- a/debian/scripts/koha-functions.sh
+++ b/debian/scripts/koha-functions.sh
@@ -50,7 +50,7 @@ get_memcached_servers_for()
     local apache_file=$(get_apache_config_for $instance)
     local memcached_servers=$(
         grep 'MEMCACHED_SERVERS' ${apache_file} |
-        awk '{print $3}' | uniq
+        awk -F'[\t "]+' '{print $4}' | head -n 1
     )

     echo "${memcached_servers}"
@@ -63,7 +63,7 @@ get_memcached_namespace_for()
     local apache_file=$(get_apache_config_for $instance)
     local memcached_namespace=$(
         grep 'MEMCACHED_NAMESPACE' ${apache_file} |
-        awk '{print $3}' | uniq
+        awk -F'[\t "]+' '{print $4}' | head -n 1
     )

     echo "${memcached_namespace}"

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list