aboutsummaryrefslogtreecommitdiff
path: root/app/install.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-07-30 18:45:34 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-07-30 18:45:34 +0200
commitfe18d12551f626c56257f825caf8f97a4a5461ce (patch)
treebb494e7eea4589d0c08f29e644a9ed07897d4d62 /app/install.php
parenta78b3f5e7f19a1f1320fcb12f7c8b450f9a9dba4 (diff)
Update MySQL to utf8mb4 (full unicode) 🔥
* Requires MySQL 5.5.3+ (drop support for MySQL 5.0) * Requires PHP 5.3.3+ (drop support for PHP 5.3.0) https://github.com/FreshRSS/FreshRSS/issues/789#issuecomment-73878076
Diffstat (limited to 'app/install.php')
-rw-r--r--app/install.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/install.php b/app/install.php
index 062f66814..df6e1aeec 100644
--- a/app/install.php
+++ b/app/install.php
@@ -19,7 +19,7 @@ if (isset($_GET['step'])) {
define('STEP', 0);
}
-define('SQL_CREATE_DB', 'CREATE DATABASE IF NOT EXISTS %1$s DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
+define('SQL_CREATE_DB', 'CREATE DATABASE IF NOT EXISTS %1$s DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
if (STEP === 3 && isset($_POST['type'])) {
$_SESSION['bd_type'] = $_POST['type'];
@@ -253,7 +253,7 @@ function newPdo() {
case 'mysql':
$str = 'mysql:host=' . $_SESSION['bd_host'] . ';dbname=' . $_SESSION['bd_base'];
$driver_options = array(
- PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
+ PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4',
);
break;
case 'sqlite':
@@ -309,7 +309,7 @@ function checkStep0() {
}
function checkStep1() {
- $php = version_compare(PHP_VERSION, '5.3.0') >= 0;
+ $php = version_compare(PHP_VERSION, '5.3.3') >= 0;
$minz = file_exists(join_path(LIB_PATH, 'Minz'));
$curl = extension_loaded('curl');
$pdo_mysql = extension_loaded('pdo_mysql');
@@ -437,7 +437,7 @@ function checkBD() {
switch ($_SESSION['bd_type']) {
case 'mysql':
$driver_options = array(
- PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'
+ PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4'
);
try { // on ouvre une connexion juste pour créer la base si elle n'existe pas
@@ -536,7 +536,7 @@ function printStep1() {
<?php if ($res['php'] == 'ok') { ?>
<p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?></span> <?php echo _t('install.check.php.ok', PHP_VERSION); ?></p>
<?php } else { ?>
- <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?></span> <?php echo _t('install.check.php.nok', PHP_VERSION, '5.3.0'); ?></p>
+ <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?></span> <?php echo _t('install.check.php.nok', PHP_VERSION, '5.3.3'); ?></p>
<?php } ?>
<?php if ($res['minz'] == 'ok') { ?>