Bug 17862 - Misleading error message if Apache config is invalid
Summary: Misleading error message if Apache config is invalid
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (command-line installer) (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-07 20:46 UTC by Dan Michael Heggø
Modified: 2017-01-07 20:46 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Michael Heggø 2017-01-07 20:46:41 UTC
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