mirror of
https://github.com/Pathduck/gallery3.git
synced 2024-10-29 21:07:18 -04:00
Deal gracefully with bad mysql connection and database information.
This commit is contained in:
parent
0c6b36b086
commit
8384cac5e3
@ -78,7 +78,7 @@ class installer {
|
||||
}
|
||||
|
||||
static function connect($config) {
|
||||
return mysql_connect($config["host"], $config["user"], $config["password"]);
|
||||
return @mysql_connect($config["host"], $config["user"], $config["password"]);
|
||||
}
|
||||
|
||||
static function select_db($config) {
|
||||
|
6
installer/views/invalid_db_info.html.php
Normal file
6
installer/views/invalid_db_info.html.php
Normal file
@ -0,0 +1,6 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<h1> Uh oh! </h1>
|
||||
<p class="error">
|
||||
We were unable to connect to your MySQL server with the username and
|
||||
password that you provided. Please go back and try again!
|
||||
</p>
|
@ -1,2 +1,13 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<h1> Can't find that database! </h1>
|
||||
<p class="error">
|
||||
We were able to connect to your MySQL server, yay! But the database
|
||||
name you gave us doesn't exist and we don't have permissions to
|
||||
create it for you. Please create the database manually, then go
|
||||
back and try again.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<
|
||||
If you're having trouble creating the database, please contact your
|
||||
web host or system administrator for assistance.
|
||||
</p>
|
||||
|
Loading…
Reference in New Issue
Block a user