[Bug 13486] New: About page Apache version is empty if Apache version is 2.4
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 Bug ID: 13486 Summary: About page Apache version is empty if Apache version is 2.4 Change sponsored?: --- Product: Koha Version: 3.18 Hardware: PC OS: Linux Status: NEW Severity: minor Priority: P5 - low Component: About Assignee: nengard@gmail.com Reporter: chenyi.weng@techyi.com QA Contact: testopia@bugs.koha-community.org 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} -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 Jerry Weng <chenyi.weng@techyi.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|nengard@gmail.com |chenyi.weng@techyi.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 Jerry Weng <chenyi.weng@techyi.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WORKSFORME --- Comment #1 from Jerry Weng <chenyi.weng@techyi.com> --- (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`; -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 Jerry Weng <chenyi.weng@techyi.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chenyi.weng@techyi.com --- Comment #2 from Jerry Weng <chenyi.weng@techyi.com> --- Created attachment 34621 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34621&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 Paul A. <paul.a@navalmarinearchive.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.a@navalmarinearchive.c | |om --- Comment #3 from Paul A. <paul.a@navalmarinearchive.com> --- 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; -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|3.18 |master CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|WORKSFORME |--- -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This bug exists in current master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34621|0 |1 is obsolete| | --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 35674 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35674&action=edit 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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 --- Comment #6 from Paul A. <paul.a@navalmarinearchive.com> --- (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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 --- Comment #7 from Paul A. <paul.a@navalmarinearchive.com> --- (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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 --- Comment #8 from Paul A. <paul.a@navalmarinearchive.com> --- (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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 Paul A. <paul.a@navalmarinearchive.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #10 from Paul A. <paul.a@navalmarinearchive.com> --- 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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 Jerry Weng <chenyi.weng@techyi.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion --- Comment #11 from Jerry Weng <chenyi.weng@techyi.com> --- 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, -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35674|0 |1 is obsolete| | --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 39092 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39092&action=edit 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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39092|0 |1 is obsolete| | --- Comment #13 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 39094 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39094&action=edit [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 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39094|0 |1 is obsolete| | --- Comment #14 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 39385 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39385&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Mark! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gary.bortel@sos.wa.gov --- Comment #16 from Tomás Cohen Arazi <tomascohen@gmail.com> --- *** Bug 14278 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13486 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|master |3.18 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org