Bugzilla – Attachment 17380 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.26 KB, created by
Kyle M Hall (khall)
on 2013-04-12 11:45:11 UTC
(
hide
)
Description:
Bug 9941: Web installer should give error message when db connection fails
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-04-12 11:45:11 UTC
Size:
1.26 KB
patch
obsolete
>From 1ce9a37dabe7748de4d3a22bfc34722f833d6aa6 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> >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > installer/install.pl | 9 +++++++++ > 1 files changed, 9 insertions(+), 0 deletions(-) > >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.2.5
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