So I am trying to install Limesurvey 3, at first I tried installing it on a remote server, but then I switched to a local server to have better access.
I tried to install limesurvey using two different methods and I ran into an issue in both of them
1. Method 1: Normal installation following the official instructions at:
www.limesurvey.org/manual/Installation_-_LimeSurvey_CE
However, when I try to run the installation script (by going to localhost/limesurvey/admin) I get the following error message
CDbConnection failed to open the DB connection: SQLSTATE[HY000] [1049] Unknown database 'limesurvey'
This happens because the DB was not created. So I created the DB myself with a root user that has all privileges.
However after that I ran into this issue
The table "{{settings_global}}" for active record class "SettingGlobal" cannot be found in the database.
So I created the table manually, yet it runs into the same issue with the following table (and so on).
Given that this is a clean installation (i.e. I am not updating from an older version), it is not clear for me why the installation script fails to create the DB or any of the tables. Isn't supposed to check for them and create a new one if it doesn't exist ? Why does it throw an exception whenever it fails to find those table ? It is a clean installation, the DB and its table are not supposed to exist.
2. Method 2: Install Limesurvey using command line interface (CLI)
at
"limesurvey/application/commands" I run the following command
php console.php installfromconfig "C:\wamp64\www\limesurvey\application\config\config.php"
However, I get the following error message
Array
(
[connectionString] => mysql:host=localhost;port=3306;;
[emulatePrepare] => 1
[username] => root
[password] =>
[charset] => utf8mb4
[tablePrefix] => lime_
)
CException: Invalid access data. Check your config.php db access data in C:\wamp64\www\limesurvey\application\commands\InstallFromConfigCommand.php:177
The error message doesn't seem to say much about the origin of the error.
I noticed that the DB name is not there, however, it seems that it was replaced by the line below
$dbConnectArray = preg_replace('/dbname=([^;]*)/', '', $connectionString); (InstallFromConfigCommand.php at line 162)
I commented out but I still got the same error message.
Attached is a screenshot of my config.php
Other Information
PHP => 7.2.10
MySQL => 5.7.23
PhpMyAdmin => 4.8.3