Overview: Ubuntu 14.04.1, Apache version 2.4.7-1ubuntu4.1, Koha 3.18.01 About Koha Page -> Server information -> Apache version is empty Errors in directly running /usr/sbin/apache2 -V and similar entries in /var/log/koha/library/intranet-error.log [Mon Dec 22 10:18:42.479349 2014] [core:warn] [pid 2225] AH00111: Config variable ${APACHE_PID_FILE} is not defined [Mon Dec 22 10:18:42.480141 2014] [core:warn] [pid 2225] AH00111: Config variable ${APACHE_RUN_USER} is not defined [Mon Dec 22 10:18:42.480616 2014] [core:warn] [pid 2225] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined [Mon Dec 22 10:18:42.481116 2014] [core:warn] [pid 2225] AH00111: Config variable ${APACHE_LOG_DIR} is not defined [Mon Dec 22 10:18:42.728000 2014] [core:warn] [pid 2225] AH00111: Config variable ${APACHE_RUN_DIR} is not defined [Mon Dec 22 10:18:42.776297 2014] [core:warn] [pid 2225] AH00111: Config variable ${APACHE_LOG_DIR} is not defined AH00543: apache2: bad user name ${APACHE_RUN_USER}
(In reply to Jerry Weng from comment #0) > Overview: > > Ubuntu 14.04.1, Apache version 2.4.7-1ubuntu4.1, Koha 3.18.01 > About Koha Page -> Server information -> Apache version is empty > > Errors in directly running /usr/sbin/apache2 -V and similar entries in > /var/log/koha/library/intranet-error.log > [Mon Dec 22 10:18:42.479349 2014] [core:warn] [pid 2225] AH00111: Config > variable ${APACHE_PID_FILE} is not defined > [Mon Dec 22 10:18:42.480141 2014] [core:warn] [pid 2225] AH00111: Config > variable ${APACHE_RUN_USER} is not defined > [Mon Dec 22 10:18:42.480616 2014] [core:warn] [pid 2225] AH00111: Config > variable ${APACHE_RUN_GROUP} is not defined > [Mon Dec 22 10:18:42.481116 2014] [core:warn] [pid 2225] AH00111: Config > variable ${APACHE_LOG_DIR} is not defined > [Mon Dec 22 10:18:42.728000 2014] [core:warn] [pid 2225] AH00111: Config > variable ${APACHE_RUN_DIR} is not defined > [Mon Dec 22 10:18:42.776297 2014] [core:warn] [pid 2225] AH00111: Config > variable ${APACHE_LOG_DIR} is not defined > AH00543: apache2: bad user name ${APACHE_RUN_USER} Worked after fixing the following line, also tested on Apache/2.2.22 (Ubuntu), seems backward compatible. /usr/share/koha/intranet/cgi-bin/about.pl my $mysqlVersion = `mysql -V`; my $apacheVersion = `httpd -v 2> /dev/null`; $apacheVersion = `httpd2 -v 2> /dev/null` unless $apacheVersion; +$apacheVersion = (`/usr/sbin/apache2ctl -V 2> /dev/null`)[0] unless $apacheVersion; -$apacheVersion = (`/usr/sbin/apache2 -V`)[0] unless $apacheVersion; my $zebraVersion = `zebraidx -V`;
Created attachment 34621 [details] [review] about.pl patch for getting version info on the apache 2.4/2.2 about.pl patch for getting version info on the apache 2.4/2.2
The following is perhaps simpler and is backwards compatible (I wrote it for 3.18, tested it on our production 3.08): me@hood:/usr/share/koha/intranet/cgi-bin$ diff about.pl about.pl_orig 61d60 < $apacheVersion = (`/usr/sbin/apachectl -v`) unless $apacheVersion;
This bug exists in current master.
Created attachment 35674 [details] [review] Bug 13486: Apache version empty in about page if Apache 2.4 This patch makes about.pl query the running Apache version using the apache2ctl command. I tested it on Apache 2.2 and is backwards compatible (it is present in both). To test: ( On an Apache 2.4 setup ) - Go to the about page => FAIL: "Apache version:" is empty - Apply the patch - Reload the page => SUCCESS: "Apache version:" shows the correct version. - Sign off :-D If you have an Apache 2.2 setup to try it, verify that there are no regressions (trivial because you can run apache2ctl manually and verify the first result is the expecte). Regards PS. I even changed the order in which Apache version is tested because most people is using Debian/Ubuntu and it was the last option.
(In reply to Tomás Cohen Arazi from comment #5) [snip] > If you have an Apache 2.2 setup to try it, verify that there are no > regressions > (trivial because you can run apache2ctl manually and verify the first result > is the expecte). > > Regards > > PS. I even changed the order in which Apache version is tested because > most people is using Debian/Ubuntu and it was the last option. I suggest leaving it as last line. Apache2 responds with: me@production:/$ apache2ctl -v /usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted) Server version: Apache/2.2.22 (Ubuntu) Server built: Feb 13 2012 01:51:56 unless you edit /etc/security/limits.conf to include a hard and soft file limit of 8192 instead of the debian/ubuntu default 1024 ($ ulimit -n). I don't think Koha should oblige users to change "security" settings.
(In reply to Paul A. from comment #8) > (In reply to Tomás Cohen Arazi from comment #5) > [snip] > > If you have an Apache 2.2 setup to try it, verify that there are no > > regressions > > (trivial because you can run apache2ctl manually and verify the first result > > is the expecte). > > > > Regards > > > > PS. I even changed the order in which Apache version is tested because > > most people is using Debian/Ubuntu and it was the last option. > > I suggest leaving it as last line. Apache2 responds with: > > me@production:/$ apache2ctl -v > /usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not > permitted) > Server version: Apache/2.2.22 (Ubuntu) > Server built: Feb 13 2012 01:51:56 > > unless you edit /etc/security/limits.conf to include a hard and soft file > limit of 8192 instead of the debian/ubuntu default 1024 ($ ulimit -n). I > don't think Koha should oblige users to change "security" settings. Be it the first or the last line won't change the result. httpd and httpd2 would fail to run on debían anyway. Those warnings are painless btw. Please test the bugfix and sign if it works for you, in the about page.
It does in fact make a difference (3.08, Apache 2.22). As last line, it is compatible with all other "About" entries. If not last line (i.e. inserted at line 60) it adds the "Build date." I can definitely sign-off adding: $apacheVersion = (`/usr/sbin/apachectl -v`) unless $apacheVersion; as line 61.
Indeed, using "-v (lower case)" instead of "-V (upper case)" to get the Apache version information is better and should be faster. But I would keep the [0] part to extract only the needed Apache version info., especially the 'uname -a' is already there, and the "Server built:" time is meaningless in apt-get installed package. > $apacheVersion = (`/usr/sbin/apache2ctl -v`)[0] unless $apacheVersion; Regards,
Created attachment 39092 [details] [review] Bug 13486: Apache version empty in about page if Apache 2.4 This patch makes about.pl query the running Apache version using the apache2ctl command. I tested it on Apache 2.2 and is backwards compatible (it is present in both). To test: ( On an Apache 2.4 setup ) - Go to the about page => FAIL: "Apache version:" is empty - Apply the patch - Reload the page => SUCCESS: "Apache version:" shows the correct version. - Sign off :-D If you have an Apache 2.2 setup to try it, verify that there are no regressions (trivial because you can run apache2ctl manually and verify the first result is the expecte). Regards PS. I even changed the order in which Apache version is tested because most people is using Debian/Ubuntu and it was the last option.
Created attachment 39094 [details] [review] [SIGNED-OFF] Bug 13486: Apache version empty in about page if Apache 2.4 This patch makes about.pl query the running Apache version using the apache2ctl command. I tested it on Apache 2.2 and is backwards compatible (it is present in both). To test: ( On an Apache 2.4 setup ) - Go to the about page => FAIL: "Apache version:" is empty - Apply the patch - Reload the page => SUCCESS: "Apache version:" shows the correct version. - Sign off :-D If you have an Apache 2.2 setup to try it, verify that there are no regressions (trivial because you can run apache2ctl manually and verify the first result is the expecte). Regards PS. I even changed the order in which Apache version is tested because most people is using Debian/Ubuntu and it was the last option. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Tested with apache 2.2/2.4, no errors
Created attachment 39385 [details] [review] Bug 13486: Apache version empty in about page if Apache 2.4 This patch makes about.pl query the running Apache version using the apache2ctl command. I tested it on Apache 2.2 and is backwards compatible (it is present in both). To test: ( On an Apache 2.4 setup ) - Go to the about page => FAIL: "Apache version:" is empty - Apply the patch - Reload the page => SUCCESS: "Apache version:" shows the correct version. - Sign off :-D If you have an Apache 2.2 setup to try it, verify that there are no regressions (trivial because you can run apache2ctl manually and verify the first result is the expecte). Regards PS. I even changed the order in which Apache version is tested because most people is using Debian/Ubuntu and it was the last option. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Tested with apache 2.2/2.4, no errors Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Only tested with 2.4
Patch pushed to master. Thanks Mark!
*** Bug 14278 has been marked as a duplicate of this bug. ***