mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
Check if mysql extension is available while mysql setup
This commit is contained in:
parent
6983fa1b72
commit
a2af3e7f77
1 changed files with 3 additions and 0 deletions
|
|
@ -336,6 +336,9 @@ function testConnect(&$error)
|
|||
{
|
||||
if(Config::get('db') == 'mysql')
|
||||
{
|
||||
if ( !function_exists("mysqli_connect") ) {
|
||||
throw new Exception("Required PHP extension 'mysqli' is not installed");
|
||||
}
|
||||
require_once(MTTINC. 'class.db.mysql.php');
|
||||
$db = new Database_Mysql;
|
||||
$db->connect(Config::get('mysql.host'), Config::get('mysql.user'), Config::get('mysql.password'), Config::get('mysql.db'));
|
||||
|
|
|
|||
Loading…
Reference in a new issue