Hi,
Newbie here, first time install. I am trying to install FormaLMS 2.4.5 on a LAMP stack running Apache 2.4.52, MySQL 8.0.28, PHP 7.0.33 on Ubuntu 20.04.
I run the installation wizard and in step 4 it tells me my database is not UTF8.
I went as far as to create a new db in MySQL, using this:
CREATE DATABASE formalms2 CHARACTER SET utf8 COLLATE utf8_general_ci;
However, I still get this error: "The specified database is not utf8 charset." on step 4 of the config wizard.
I didn't find anything useful in the forums. If I didn't look properly, feel free to point me in the right direction. I've been banging my head against the wall on this for a couple of hours and I am getting nothing but a headache.
I'm missing something... any ideas?
Thanks,
Larry
utf8 warning at installation step 4
Re: utf8 warning at installation step 4
Can you run this query on dB?
show variables like 'character_set_database'
show variables like 'character_set_database'
Per supporto GRATUITO contattatemi in privato qui
Re: utf8 warning at installation step 4
Hi,
It tells me (of course) that the character set on the database is utf8mb4. hmm... Looking for ways to correct that.
Larry
It tells me (of course) that the character set on the database is utf8mb4. hmm... Looking for ways to correct that.
Larry
Re: utf8 warning at installation step 4
Hi,
When I do
'SELECT SCHEMA_NAME 'database', default_character_set_name 'charset', DEFAULT_COLLATION_NAME 'collation' FROM information_schema.SCHEMATA;'
It shows that my formalms database is UTF8 with collation utf8_general_ci...
But the result of the query 'show variables like 'character_set_database' returns a value of 'utf8mb3'
(my previous post was incorrect)
Thanks,
Larry
When I do
'SELECT SCHEMA_NAME 'database', default_character_set_name 'charset', DEFAULT_COLLATION_NAME 'collation' FROM information_schema.SCHEMATA;'
It shows that my formalms database is UTF8 with collation utf8_general_ci...
But the result of the query 'show variables like 'character_set_database' returns a value of 'utf8mb3'
(my previous post was incorrect)
Thanks,
Larry
Re: utf8 warning at installation step 4
The installer wants character_set_database variable to be utf8, not utf8mb3.
You may bypass it in /install/controllers/Step4Controller.php, function checkDBCharset
You may bypass it in /install/controllers/Step4Controller.php, function checkDBCharset
Per supporto GRATUITO contattatemi in privato qui
Re: utf8 warning at installation step 4
Hi,
I adjusted the function and was able to get past the problem. THANK YOU for your help!
Not critical, but do you any idea why that the page for Step 7 comes up in Italian?
I was able to complete the install, so you saved me and I really appreciate your willingness to help.
I am able to log into the system now.
Thanks!!
Larry Wescott
I adjusted the function and was able to get past the problem. THANK YOU for your help!
Not critical, but do you any idea why that the page for Step 7 comes up in Italian?
I was able to complete the install, so you saved me and I really appreciate your willingness to help.
I am able to log into the system now.
Thanks!!
Larry Wescott
Re: utf8 warning at installation step 4
I don't remember of your issue, but I didn't find anything in the code. I searched for hardcoded Italian (Forma developers are Italian, as I am) with no apparent luck. If you can post a screenshot, I can confirm. Otherwise, let's wait my next install for a customer
Per supporto GRATUITO contattatemi in privato qui
Re: utf8 warning at installation step 4
Some Italian keys have been inserted in all other languages files for installer.
You can fix in /lib/installer/lang/english.php for English language.
You can fix in /lib/installer/lang/english.php for English language.
Per supporto GRATUITO contattatemi in privato qui
Re: utf8 warning at installation step 4
In case anyone has the same issue and does not know how to edit the code, here is a quick breakdown:
Replace the code in the file: /install/controllers/Step4Controller.php (starting at line 73)
if ($this->checkDBEmpty($db_name)) {
if ($this->checkDBCharset()) {
if ($this->checkStrictMode()) {
--$err;
array_push($res['ok'], 'db_host', 'db_name', 'db_user', 'db_pass', 'db_type');
} else {
array_push($res['err'], 'db_host');
array_push($res['ok'], 'db_name', 'db_user', 'db_pass', 'db_type');
$res['msg'] = Lang::t('_SQL_STRICT_MODE_WARN');
}
} else {
array_push($res['err'], 'db_name');
array_push($res['ok'], 'db_host', 'db_user', 'db_pass', 'db_type');
$res['msg'] = Lang::t('_DB_NOT_UTF8');
}
} else {
array_push($res['err'], 'db_name');
array_push($res['ok'], 'db_host', 'db_user', 'db_pass', 'db_type');
$res['msg'] = Lang::t('_DB_NOT_EMPTY');
}
with this code:
if ($this->checkDBEmpty($db_name)) {
if ($this->checkStrictMode()) {
--$err;
array_push($res['ok'], 'db_host', 'db_name', 'db_user', 'db_pass', 'db_type');
} else {
array_push($res['err'], 'db_host');
array_push($res['ok'], 'db_name', 'db_user', 'db_pass', 'db_type');
$res['msg'] = Lang::t('_SQL_STRICT_MODE_WARN');
}
} else {
array_push($res['err'], 'db_name');
array_push($res['ok'], 'db_host', 'db_user', 'db_pass', 'db_type');
$res['msg'] = Lang::t('_DB_NOT_EMPTY');
}
Hope this helps.
Replace the code in the file: /install/controllers/Step4Controller.php (starting at line 73)
if ($this->checkDBEmpty($db_name)) {
if ($this->checkDBCharset()) {
if ($this->checkStrictMode()) {
--$err;
array_push($res['ok'], 'db_host', 'db_name', 'db_user', 'db_pass', 'db_type');
} else {
array_push($res['err'], 'db_host');
array_push($res['ok'], 'db_name', 'db_user', 'db_pass', 'db_type');
$res['msg'] = Lang::t('_SQL_STRICT_MODE_WARN');
}
} else {
array_push($res['err'], 'db_name');
array_push($res['ok'], 'db_host', 'db_user', 'db_pass', 'db_type');
$res['msg'] = Lang::t('_DB_NOT_UTF8');
}
} else {
array_push($res['err'], 'db_name');
array_push($res['ok'], 'db_host', 'db_user', 'db_pass', 'db_type');
$res['msg'] = Lang::t('_DB_NOT_EMPTY');
}
with this code:
if ($this->checkDBEmpty($db_name)) {
if ($this->checkStrictMode()) {
--$err;
array_push($res['ok'], 'db_host', 'db_name', 'db_user', 'db_pass', 'db_type');
} else {
array_push($res['err'], 'db_host');
array_push($res['ok'], 'db_name', 'db_user', 'db_pass', 'db_type');
$res['msg'] = Lang::t('_SQL_STRICT_MODE_WARN');
}
} else {
array_push($res['err'], 'db_name');
array_push($res['ok'], 'db_host', 'db_user', 'db_pass', 'db_type');
$res['msg'] = Lang::t('_DB_NOT_EMPTY');
}
Hope this helps.