Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
Fix 🐛
  • Loading branch information
GaneshKandu committed Dec 30, 2018
1 parent f9b59c2 commit 888c025
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

To help us resolve your issue more quickly, please use the following template:

## Version Info
- KChat version: ``` ? ```
- PHP version: ``` ? ```
- MySQL version: ``` ? ```
- Web server (Ex. Apache, nginx or IIS?) : ``` ? ```
- OS name and version: ``` ? ```

## Expected Behavior

> Write here
## Actual Behavior

> Write here
## Steps to Reproduce

> Write here
## Error Log

> Upload ```logs/kchat.log.php``` file
7 changes: 6 additions & 1 deletion kchat/ctrl/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,12 @@ function install(){
PDO::MYSQL_ATTR_FOUND_ROWS => TRUE
);

$this->data['pdo'] = new PDO("mysql:host=".$_POST['host'].";dbname=".$_POST['database'].";port=".$_POST['port'].";charset=utf8", $_POST['username'], $_POST['password'],$opt);
try{
$this->data['pdo'] = new PDO("mysql:host=".$_POST['host'].";dbname=".$_POST['database'].";port=".$_POST['port'].";charset=utf8", $_POST['username'], $_POST['password'],$opt);
}catch(Exception $e){
$_SESSION['ERROR'] = $e->getMessage();
exit;
}

$db = array(
"db_host" => $_POST['host'],
Expand Down
6 changes: 6 additions & 0 deletions kchat/ctrl/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ function index(){
$array['error'][] = $module." is Not Installed";
}
}

if(isset($_SESSION['ERROR'])){
$array['error'][] = $_SESSION['ERROR'];
unset($_SESSION['ERROR']);
}

$this->load->set($array);
$this->load->view('install');
}
Expand Down

0 comments on commit 888c025

Please sign in to comment.