[Koha-bugs] [Bug 17862] New: Misleading error message if Apache config is invalid

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Jan 7 21:46:41 CET 2017


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

            Bug ID: 17862
           Summary: Misleading error message if Apache config is invalid
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P5 - low
         Component: Installation and upgrade (command-line installer)
          Assignee: gmcharlt at gmail.com
          Reporter: danmichaelo+kohabugs at gmail.com
        QA Contact: testopia at bugs.koha-community.org

When I ran `koha_create`, I got the error message "Koha requires mpm_itk to be
enabled within Apache in order to run." from the `check_apache_config` method
even though I had mpm_itk enabled.

The real problem was a typo in one of my Apache config file, but the test on
line 148 in `koha_create` doesn't distinguish between an invalid Apache config
and a valid Apache config with mpm_itk missing:

    /usr/sbin/apachectl -M 2> /dev/null | grep -q 'mpm_itk'

I suggest to check for a valid Apache config before checking for mpm_itk. For
instance like so:

if ! /usr/sbin/apachectl configtest 2> /dev/null ; then
cat 1>&2  <<EOM
apachectl configtest failed. Please check your Apache config.
EOM
die
fi

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


More information about the Koha-bugs mailing list