aboutsummaryrefslogtreecommitdiffhomepage
path: root/install/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'install/index.php')
-rwxr-xr-xinstall/index.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/install/index.php b/install/index.php
index 1ae782a2..2b080c16 100755
--- a/install/index.php
+++ b/install/index.php
@@ -101,12 +101,14 @@ else if (isset($_POST['install'])) {
101 $content = file_get_contents('inc/poche/config.inc.php'); 101 $content = file_get_contents('inc/poche/config.inc.php');
102 102
103 if ($_POST['db_engine'] == 'mysql') { 103 if ($_POST['db_engine'] == 'mysql') {
104 $db_path = 'mysql:host=' . $_POST['mysql_server'] . ';dbname=' . $_POST['mysql_database']; 104 $db_path = 'mysql:host=' . $_POST['mysql_server'] . ';dbname=' . $_POST['mysql_database'] . ';charset=utf8mb4';
105 $content = str_replace("define ('STORAGE_SERVER', 'localhost');", "define ('STORAGE_SERVER', '".$_POST['mysql_server']."');", $content); 105 $content = str_replace("define ('STORAGE_SERVER', 'localhost');", "define ('STORAGE_SERVER', '".$_POST['mysql_server']."');", $content);
106 $content = str_replace("define ('STORAGE_DB', 'poche');", "define ('STORAGE_DB', '".$_POST['mysql_database']."');", $content); 106 $content = str_replace("define ('STORAGE_DB', 'poche');", "define ('STORAGE_DB', '".$_POST['mysql_database']."');", $content);
107 $content = str_replace("define ('STORAGE_USER', 'poche');", "define ('STORAGE_USER', '".$_POST['mysql_user']."');", $content); 107 $content = str_replace("define ('STORAGE_USER', 'poche');", "define ('STORAGE_USER', '".$_POST['mysql_user']."');", $content);
108 $content = str_replace("define ('STORAGE_PASSWORD', 'poche');", "define ('STORAGE_PASSWORD', '".$_POST['mysql_password']."');", $content); 108 $content = str_replace("define ('STORAGE_PASSWORD', 'poche');", "define ('STORAGE_PASSWORD', '".$_POST['mysql_password']."');", $content);
109 $handle = new PDO($db_path, $_POST['mysql_user'], $_POST['mysql_password']); 109 $handle = new PDO($db_path, $_POST['mysql_user'], $_POST['mysql_password'], array(
110 PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4',
111 ));
110 112
111 $sql_structure = file_get_contents('install/mysql.sql'); 113 $sql_structure = file_get_contents('install/mysql.sql');
112 } 114 }