View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
10417 | Bug reports | Installation | public | 2016-02-12 15:29 | 2016-02-16 00:36 |
Reporter | ollehar | Assigned To | DenisChenu | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.50.x | ||||
Target Version | 2.50.x | Fixed in Version | 2.50.x | ||
Summary | 10417: Installer does not create new database when it should | ||||
Description | Installer does not create new database when it should | ||||
Steps To Reproduce | In installer and db settings, write a name of a db that doesn't exist yet. It should be created, but instead there is an error. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 8 | ||||
Complete LimeSurvey version number (& build) | latest | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | - | ||||
Server OS (if known) | - | ||||
Webserver software & version (if known) | - | ||||
PHP Version | - | ||||
Using $e->getCode()!=1049 and update stepDatabaseConfiguration dbTest :
You're sure for code ? It work for
|
|
Works for MySQL but not Postgres. |
|
Maybe partly my fault. The exception code 1049 for "Database not found" exception only works for MySQL. |
|
Maybe this could help? http://stackoverflow.com/questions/15177652/pdo-check-if-database-exists Not sure which databases it works for, though. |
|
OK, it's what i think this part ois DB specific 1st solution then must do it in 2 part :
2nd solution : find the correct SQLSTATE error returned , no driver dependant (or find the 3 errorCode() for mysql/pgsql and mssql) PS: http://docstore.mik.ua/orelly/java-ent/jenut/ch08_06.htm ? |
|
@olle : can you validate if LS is able to create table https://raw.githubusercontent.com/LimeSurvey/LimeSurvey/3ff4864c0c5d32016fb1f7f8bead380856a66571/application/controllers/InstallerController.php (previous file) with pgsql ? Seems return 7 : OK I just try with a user who have all rights on my system : with old system retunr "invalid connexion" |
|
Will do. |
|
Uploaded screenshot with my error. |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=17399 |
|
I'm unsure if we can send the error if DB not exist and myusql/pgsql. Actaulllly right on DB are not completely done. I make some other try (to send user access to this DB error specifc) |
|
I'm not so sure that we should let the installer to create a DB. It implies to push people to use a db user with a strong level of permissions... which is a bad security behaviour... does other Web app like joomla or spip installers can create databases ? |
|
Yes, I have a specific user with sp_% rights only in mysql. I really think to udate the system again, but more simple and try to send maximum information. For example : if user don't have DB access : we don't have to try without dbname. PS: DB creation is done since LS exist. |
|
2.50+ Build 160215 released |
|
LimeSurvey: master 7dcc37ce 2016-02-12 18:13 Details Diff |
Dev: Fixed issue : Try to create DB if not exist and connexion is OK Dev: dbTest always return to model if connexion is not done Dev: return true/false for dbexist |
Affected Issues 10417 |
|
mod - application/controllers/InstallerController.php | Diff File | ||
LimeSurvey: master 8eb152c7 2016-02-15 15:00 Details Diff |
Fixed issue 10417: Installer does not create new database when it should Dev: test is the error is "No DB" for mysql and pgsql Dev: If not : use same system than before Dev: Like old version, but more information |
Affected Issues 10417 |
|
mod - application/controllers/InstallerController.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-02-12 15:29 | ollehar | New Issue | |
2016-02-12 15:29 | ollehar | Status | new => assigned |
2016-02-12 15:29 | ollehar | Assigned To | => DenisChenu |
2016-02-13 14:22 | DenisChenu | Changeset attached | => LimeSurvey master 7dcc37ce |
2016-02-13 14:25 | DenisChenu | Note Added: 35092 | |
2016-02-13 14:26 | DenisChenu | Status | assigned => resolved |
2016-02-13 14:26 | DenisChenu | Fixed in Version | => 2.5 |
2016-02-13 14:26 | DenisChenu | Resolution | open => fixed |
2016-02-15 10:45 | ollehar | Note Added: 35111 | |
2016-02-15 10:45 | ollehar | Status | resolved => assigned |
2016-02-15 10:53 | ollehar | Note Added: 35112 | |
2016-02-15 10:55 | ollehar | Note Added: 35113 | |
2016-02-15 10:55 | ollehar | Note Edited: 35113 | |
2016-02-15 11:01 | DenisChenu | Note Added: 35115 | |
2016-02-15 11:02 | DenisChenu | Note Edited: 35115 | |
2016-02-15 13:46 | DenisChenu | Note Added: 35138 | |
2016-02-15 13:52 | ollehar | Note Added: 35139 | |
2016-02-15 13:53 | ollehar | File Added: Screenshot from 2016-02-15 13:53:42.png | |
2016-02-15 13:54 | ollehar | Note Added: 35140 | |
2016-02-15 15:01 | DenisChenu | Changeset attached | => LimeSurvey master 8eb152c7 |
2016-02-15 15:01 | DenisChenu | Note Added: 35144 | |
2016-02-15 15:13 | DenisChenu | Note Added: 35145 | |
2016-02-15 15:13 | DenisChenu | Status | assigned => resolved |
2016-02-15 18:00 |
|
Note Added: 35156 | |
2016-02-15 18:32 | DenisChenu | Note Added: 35165 | |
2016-02-15 18:33 | DenisChenu | Note Edited: 35165 | |
2016-02-16 00:36 | c_schmitz | Note Added: 35178 | |
2016-02-16 00:36 | c_schmitz | Status | resolved => closed |