Without a require CGI, the $CGI::VERSION checks in C4::Context are checking against undefined. I have a series of 2 patches to demonstrate and then fix the missing require.
Created attachment 64165 [details] [review] Bug 18771: CGI.pm: Subroutine multi_param redefined The commands in the test plan are examples, and may need varying depending on your installation. This was created as a result of attempting to clean the installation process up. However, I believe the redefine might exist normally too. I just didn't check. This is tested on a Debian 8 box sudo apt-get update'd fully. TEST PLAN --------- empty error log $ echo > ~/koha-dev/var/log/koha-error_log drop and recreate and empty db > drop database koha_library; > create database koha_library; > quit run the web installer, but DO NOT LOG IN! *opening chrome to Staff Client URL* check the error log $ less ~/koha-dev/var/log/koha-error_log ... [Fri Jun 09 13:08:52.793627 2017] [cgi:error] [pid 5802] [client 192.168.71.101:58169] AH01215: [Fri Jun 9 13:08:52 2017] CGI.pm: Subroutine multi_param redefined at /usr/share/perl5/CGI.pm line 419. ... apply first patch empty error log $ echo > ~/koha-dev/var/log/koha-error_log refresh the installation login page recheck the error log $ less ~/koha-dev/var/log/koha-error_log [Fri Jun 09 12:59:06.705954 2017] [cgi:error] [pid 5692] [client 192.168.71.101:57887] AH01215: Low version [Fri Jun 09 12:59:06.723323 2017] [cgi:error] [pid 5692] [client 192.168.71.101:57887] AH01215: Is actually: 4.09 ... notice that 4.09 is bigger than the 4.08 condition, and that the code was triggered because $CGI::VERSION is undefined, since there was no require to set the VERSION value. apply second patch empty error log $ echo > ~/koha-dev/var/log/koha-error_log refresh the installation login page recheck the error log $ less ~/koha-dev/var/log/koha-error_log notice no reference to "Subroutine multi_param redefined" run koha qa test tools
Created attachment 64166 [details] [review] Bug 18771: CGI.pm: Subroutine multi_param redefined TEST PLAN --------- Follow the test plan on the first patch. Notice that with both patches applied, it is just a require CGI; and comment added.
I figured a side trip to a fresh web install after > drop database koha_library; > create database koha_library; would kind of tie into the fixing tests that we are doing with making tests more robust. Hope you don't mind being added, Lee and Jonathan. :)
Not at all! I'll take a look at it this morning
Created attachment 64729 [details] [review] Bug 18771: CGI.pm: Subroutine multi_param redefined The commands in the test plan are examples, and may need varying depending on your installation. This was created as a result of attempting to clean the installation process up. However, I believe the redefine might exist normally too. I just didn't check. This is tested on a Debian 8 box sudo apt-get update'd fully. TEST PLAN --------- empty error log $ echo > ~/koha-dev/var/log/koha-error_log drop and recreate and empty db > drop database koha_library; > create database koha_library; > quit run the web installer, but DO NOT LOG IN! *opening chrome to Staff Client URL* check the error log $ less ~/koha-dev/var/log/koha-error_log ... [Fri Jun 09 13:08:52.793627 2017] [cgi:error] [pid 5802] [client 192.168.71.101:58169] AH01215: [Fri Jun 9 13:08:52 2017] CGI.pm: Subroutine multi_param redefined at /usr/share/perl5/CGI.pm line 419. ... apply first patch empty error log $ echo > ~/koha-dev/var/log/koha-error_log refresh the installation login page recheck the error log $ less ~/koha-dev/var/log/koha-error_log [Fri Jun 09 12:59:06.705954 2017] [cgi:error] [pid 5692] [client 192.168.71.101:57887] AH01215: Low version [Fri Jun 09 12:59:06.723323 2017] [cgi:error] [pid 5692] [client 192.168.71.101:57887] AH01215: Is actually: 4.09 ... notice that 4.09 is bigger than the 4.08 condition, and that the code was triggered because $CGI::VERSION is undefined, since there was no require to set the VERSION value. apply second patch empty error log $ echo > ~/koha-dev/var/log/koha-error_log refresh the installation login page recheck the error log $ less ~/koha-dev/var/log/koha-error_log notice no reference to "Subroutine multi_param redefined" run koha qa test tools Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Created attachment 64730 [details] [review] Bug 18771: CGI.pm: Subroutine multi_param redefined TEST PLAN --------- Follow the test plan on the first patch. Notice that with both patches applied, it is just a require CGI; and comment added. Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Comment on attachment 64729 [details] [review] Bug 18771: CGI.pm: Subroutine multi_param redefined Needed to make the second patch apply. Patches were split so testing could be done to prove why the final result is the final result.
Created attachment 64753 [details] [review] Bug 18771: CGI.pm: Subroutine multi_param redefined The commands in the test plan are examples, and may need varying depending on your installation. This was created as a result of attempting to clean the installation process up. However, I believe the redefine might exist normally too. I just didn't check. This is tested on a Debian 8 box sudo apt-get update'd fully. TEST PLAN --------- empty error log $ echo > ~/koha-dev/var/log/koha-error_log drop and recreate and empty db > drop database koha_library; > create database koha_library; > quit run the web installer, but DO NOT LOG IN! *opening chrome to Staff Client URL* check the error log $ less ~/koha-dev/var/log/koha-error_log ... [Fri Jun 09 13:08:52.793627 2017] [cgi:error] [pid 5802] [client 192.168.71.101:58169] AH01215: [Fri Jun 9 13:08:52 2017] CGI.pm: Subroutine multi_param redefined at /usr/share/perl5/CGI.pm line 419. ... apply first patch empty error log $ echo > ~/koha-dev/var/log/koha-error_log refresh the installation login page recheck the error log $ less ~/koha-dev/var/log/koha-error_log [Fri Jun 09 12:59:06.705954 2017] [cgi:error] [pid 5692] [client 192.168.71.101:57887] AH01215: Low version [Fri Jun 09 12:59:06.723323 2017] [cgi:error] [pid 5692] [client 192.168.71.101:57887] AH01215: Is actually: 4.09 ... notice that 4.09 is bigger than the 4.08 condition, and that the code was triggered because $CGI::VERSION is undefined, since there was no require to set the VERSION value. apply second patch empty error log $ echo > ~/koha-dev/var/log/koha-error_log refresh the installation login page recheck the error log $ less ~/koha-dev/var/log/koha-error_log notice no reference to "Subroutine multi_param redefined" run koha qa test tools Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 64754 [details] [review] Bug 18771: CGI.pm: Subroutine multi_param redefined TEST PLAN --------- Follow the test plan on the first patch. Notice that with both patches applied, it is just a require CGI; and comment added. Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Would certainly not oppose to squash both patches and reduce the verbosity of the commit message now. The point has been made very clear. Thx Mark!
(In reply to Marcel de Rooy from comment #10) > Would certainly not oppose to squash both patches and reduce the verbosity > of the commit message now. The point has been made very clear. Thx Mark! Sometimes during the course of doing a patch, you need to show the intermediate work. Since this has passed QA, I concur that a squash is in order.
Created attachment 64755 [details] [review] Bug 18771: CGI.pm: Subroutine multi_param redefined The commands in the test plan are examples, and may need varying depending on your installation. This was created as a result of attempting to clean the installation process up. However, I believe the redefine might exist normally too. I just didn't check. This is tested on a Debian 8 box sudo apt-get update'd fully. TEST PLAN --------- empty error log $ echo > ~/koha-dev/var/log/koha-error_log drop and recreate and empty db > drop database koha_library; > create database koha_library; > quit run the web installer, but DO NOT LOG IN! *opening chrome to Staff Client URL* check the error log $ less ~/koha-dev/var/log/koha-error_log ... [Fri Jun 09 13:08:52.793627 2017] [cgi:error] [pid 5802] [client 192.168.71.101:58169] AH01215: [Fri Jun 9 13:08:52 2017] CGI.pm: Subroutine multi_param redefined at /usr/share/perl5/CGI.pm line 419. ... apply patch empty error log $ echo > ~/koha-dev/var/log/koha-error_log refresh the installation login page recheck the error log $ less ~/koha-dev/var/log/koha-error_log notice no reference to "Subroutine multi_param redefined" run koha qa test tools Notice that it is just a require CGI; and comment added. Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Squashed and shortened commit message as per comment #10.
Note: This only affects installations without plack running
Pushed to master for 17.11, thanks to everybody involved!
Pushed to 17.05.x, will be in 17.05.02
This patch has been pushed to 16.11.x and will be in 16.11.10.
Pushed to 16.05.x, for 16.05.15 release