Bugzilla – Attachment 17070 Details for
Bug 9941
with Plack, Web installer should not die with stacktrace when database does not exist
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9941: Web installer should give error message when db connection fails
Bug-9941-Web-installer-should-give-error-message-w.patch (text/plain), 1.19 KB, created by
Chris Cormack
on 2013-03-31 02:29:44 UTC
(
hide
)
Description:
Bug 9941: Web installer should give error message when db connection fails
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2013-03-31 02:29:44 UTC
Size:
1.19 KB
patch
obsolete
>From 5199a8ff9927b51c4c16dac4ac7c0036423cc63c Mon Sep 17 00:00:00 2001 >From: Jared Camins-Esakov <jcamins@cpbibliography.com> >Date: Sat, 30 Mar 2013 09:28:16 -0400 >Subject: [PATCH] Bug 9941: Web installer should give error message when db > connection fails > >To test: >1) Point Koha at a database that does not exist in koha-conf.xml. >2) Start up web installer. >3) Watch web installer crash and burn. >4) Apply patch. >5) Start up web installer. >6) Watch the web installer tell you it failed to connect without any > sort of horrible error message. > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > installer/install.pl | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/installer/install.pl b/installer/install.pl >index 58388cb..67b8f3a 100755 >--- a/installer/install.pl >+++ b/installer/install.pl >@@ -20,6 +20,15 @@ my $step = $query->param('step'); > my $language = $query->param('language'); > my ( $template, $loggedinuser, $cookie ); > >+eval { >+ my $dbh = C4::Context->dbh; >+}; >+ >+if ($@) { >+ print "Unable to connect to database. Please check your database configuration in koha-conf.xml"; >+ exit; >+} >+ > my $all_languages = getAllLanguages(); > > if ( defined($language) ) { >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9941
:
17041
|
17070
|
17228
|
17380
|
17381