LimeSurvey issue tracker
Registration

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
07610Bug reports[All Projects] Authenticationpublic2013-01-30 15:412013-10-22 15:33
Reporterjoop 
Assigned Toc_schmitz 
PrioritynormalSeverityfeature 
StatusclosedResolutionfixed 
Product Version 
Target VersionFixed in Version2.00+ 
Summary07610: Missing MSSQL support under Linux
DescriptionLimeSurvey 2.0 does not support other drivers than pdo_mysql, pdo_mysqli, Postgres (pdo_pgsql), MSSQL (pdo_sqlsrv). As pdo_sqlsrv is only supported under Windows, currently MS SQL server is not supported under Linux.
Additional InformationA possible solution: Support for pdo_dblib or pdo_odbc drivers
When pdo_dblib or pdo_odbc drivers are supported, MS SQL server can be used under Linux.
I will donate to the project if issue is resolved within 48 hrs
LimeSurvey build number OR git commit ID
Browser
Database & DB-Version
Operating System (Server)
Webserver software & version
PHP Version
Attached Files

- Relationships

-  Notes
User avatar (25986)
joop (reporter)
2013-08-12 16:30

I reviewed the LimeSurvey code about the database driver implementation; Actually the used framework already supports the pdo_dblib driver. The adaptations that should be made for pdo_dblib to work are already made for pdo_sqlsrv and require only a small extension for these statements. As proof-of-principle I adapted Limesurvey 2.00 plus (build 130611) to work with pdo_dblib. Adapted files are uploaded in a ZIP-file. The adapted lines are recognizable by comments “// ADAPTED JV”. In my adaptations I assume DBLIB is always used to connect a MS SQL-server database, though the driver can theoretically support other databases. I used DBLIB in combination with the FreeTDS driver.

Hope this helps to get pdp_dblib supported in the next LimeSurvey versions.

Furthermore I saw that not always proper SQL coding is used in the create statements specific for MS SQL-server; sometimes no “NULL” is used in the column specification. Data type “TEXT” is deprecated since SQL server 2005. Adapted files are also attached in the same ZIP.
User avatar (25999)
joop (reporter)
2013-08-15 18:36

I actually also tried getting LimeSurvey to work with pdo_odbc. The Yii framework doesn't support pdo_odbc by default. As you adapt Yii to use MssqlSchema for odbc driver, you still have the problem that pdo_odbc doesn't function with parameter binding, which makes it useless for LimeSurvey.
User avatar (26331)
c_schmitz (administrator)
2013-09-23 14:22

@joop: Thank you for your effort. I completely overlooked the attached patch, so sorry! I will check it and let you know.
User avatar (26354)
c_schmitz (administrator)
2013-09-24 15:00

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=13050 [^]
User avatar (26366)
c_schmitz (administrator)
2013-09-25 17:21

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=13062 [^]
User avatar (26367)
c_schmitz (administrator)
2013-09-25 17:26

joop, thank you. I did a few minor changes but in general your patch helped a great deal. This will be available in the next 2.0+ build.
User avatar (26368)
c_schmitz (administrator)
2013-09-25 17:52

Fix committed to 2.05 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=13064 [^]
User avatar (26670)
c_schmitz (administrator)
2013-10-09 11:22

2.00+ Build 121009 released
User avatar (26825)
joop (reporter)
2013-10-16 19:17

There is still a small bug in InstallerController.php at line 297. The installation will not work if you have an empty database, while using dblib.
The assumption that $this->connection->createCommand()->select()->from('{{surveys}}')->queryAll(); will throw an error is not true with MSSQL. It will just return an empty result set, so the catch is never reached and bTablesDoNotExist will not be set to true (and no tables will be populated).
I think using a row count query like I used in my patch will solve the problem.
User avatar (26878)
c_schmitz (administrator)
2013-10-21 16:11

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=13307 [^]
User avatar (26879)
c_schmitz (administrator)
2013-10-21 16:11

Thank you for the hint!
User avatar (26880)
c_schmitz (administrator)
2013-10-21 16:12

Fix committed to 2.05 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=13309 [^]
User avatar (26908)
c_schmitz (administrator)
2013-10-22 15:33

Version 2.00+ Build 131022 released.

- Related Changesets
LimeSurvey: master 58520989
Timestamp: 2013-09-24 12:59:14
Author: c_schmitz
Committer: Carsten Schmitz
Details ] Diff ]
Fixed issue 07610: Missing MSSQL support under Linux (pdo_dblib support)
Dev Note: Not completed yet
mod - application/commands/InstallCommand.php Diff ] File ]
add - application/config/config-sample-dblib.php Diff ] File ]
mod - application/controllers/InstallerController.php Diff ] File ]
mod - application/controllers/Statistics_userController.php Diff ] File ]
mod - application/helpers/admin/statistics_helper.php Diff ] File ]
mod - application/helpers/common_helper.php Diff ] File ]
mod - application/helpers/database_helper.php Diff ] File ]
mod - application/helpers/export_helper.php Diff ] File ]
mod - application/helpers/expressions/em_manager_helper.php Diff ] File ]
mod - application/helpers/frontend_helper.php Diff ] File ]
mod - application/helpers/update/updatedb_helper.php Diff ] File ]
mod - application/models/InstallerConfigForm.php Diff ] File ]
mod - application/models/Participants.php Diff ] File ]
mod - application/views/admin/survey/surveySummary_view.php Diff ] File ]
LimeSurvey: master 9abc3845
Timestamp: 2013-09-25 15:20:49
Author: c_schmitz
Committer: Carsten Schmitz
Details ] Diff ]
Fixed issue 07610: Missing MSSQL support under Linux (pdo_dblib support)
Dev Part 2 - should be fully working now
mod - application/helpers/admin/activate_helper.php Diff ] File ]
mod - application/helpers/database_helper.php Diff ] File ]
mod - installer/sql/create-mssql.sql Diff ] File ]
LimeSurvey: 2.05 9fba97a8
Timestamp: 2013-09-25 15:40:00
Author: c_schmitz
Committer: Carsten Schmitz
Details ] Diff ]
Fixed issue 07610: Missing MSSQL support under Linux (pdo_dblib support)
Dev Part 2 - should be fully working now
mod - application/commands/InstallCommand.php Diff ] File ]
add - application/config/config-sample-dblib.php Diff ] File ]
mod - application/controllers/InstallerController.php Diff ] File ]
mod - application/controllers/Statistics_userController.php Diff ] File ]
mod - application/helpers/admin/activate_helper.php Diff ] File ]
mod - application/helpers/admin/statistics_helper.php Diff ] File ]
mod - application/helpers/common_helper.php Diff ] File ]
mod - application/helpers/database_helper.php Diff ] File ]
mod - application/helpers/export_helper.php Diff ] File ]
mod - application/helpers/expressions/em_manager_helper.php Diff ] File ]
mod - application/helpers/frontend_helper.php Diff ] File ]
mod - application/helpers/update/updatedb_helper.php Diff ] File ]
mod - application/models/InstallerConfigForm.php Diff ] File ]
mod - application/models/Participant.php Diff ] File ]
mod - application/views/admin/survey/surveySummary_view.php Diff ] File ]
mod - installer/sql/create-mssql.sql Diff ] File ]
LimeSurvey: master 33e8418f
Timestamp: 2013-10-21 14:11:11
Author: c_schmitz
Committer: Carsten Schmitz
Details ] Diff ]
Fixed issue 07610: Failing check for existing database with DBLIB driver
mod - application/controllers/InstallerController.php Diff ] File ]
LimeSurvey: 2.05 187bdc3e
Timestamp: 2013-10-21 14:11:11
Author: c_schmitz
Committer: Carsten Schmitz
Details ] Diff ]
Fixed issue 07610: Failing check for existing database with DBLIB driver
mod - application/controllers/InstallerController.php Diff ] File ]

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: c_schmitz, ChacoKevy, joop
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2013-08-12 16:30 joop Note Added: 25986
2013-08-12 16:31 joop File Added: pdodblib support - 2.00 plus build 130611.zip
2013-08-15 18:36 joop Note Added: 25999
2013-09-23 14:21 c_schmitz Assigned To => c_schmitz
2013-09-23 14:21 c_schmitz Status acknowledged => assigned
2013-09-23 14:22 c_schmitz Note Added: 26331
2013-09-23 14:31 c_schmitz Project Feature requests => Development
2013-09-23 14:48 c_schmitz Summary MS SQL support under Linux => Missing MSSQL support under Linux
2013-09-23 14:48 c_schmitz Additional Information Updated View Revisions
2013-09-23 14:48 c_schmitz Project Development => Bug reports
2013-09-24 15:00 c_schmitz Changeset attached => LimeSurvey master 58520989
2013-09-24 15:00 c_schmitz Note Added: 26354
2013-09-24 15:00 c_schmitz Resolution open => fixed
2013-09-25 17:21 c_schmitz Changeset attached => LimeSurvey master 9abc3845
2013-09-25 17:21 c_schmitz Note Added: 26366
2013-09-25 17:25 c_schmitz File Deleted: pdodblib support - 2.00 plus build 130611.zip
2013-09-25 17:26 c_schmitz Note Added: 26367
2013-09-25 17:26 c_schmitz Status assigned => resolved
2013-09-25 17:26 c_schmitz Fixed in Version => 2.00+
2013-09-25 17:52 c_schmitz Changeset attached => LimeSurvey 2.05 9fba97a8
2013-09-25 17:52 c_schmitz Note Added: 26368
2013-10-09 11:22 c_schmitz Note Added: 26670
2013-10-09 11:22 c_schmitz Status resolved => closed
2013-10-16 19:17 joop Note Added: 26825
2013-10-16 19:17 joop Status closed => feedback
2013-10-16 19:17 joop Resolution fixed => reopened
2013-10-21 16:11 c_schmitz Changeset attached => LimeSurvey master 33e8418f
2013-10-21 16:11 c_schmitz Note Added: 26878
2013-10-21 16:11 c_schmitz Note Added: 26879
2013-10-21 16:11 c_schmitz Status feedback => resolved
2013-10-21 16:11 c_schmitz Resolution reopened => fixed
2013-10-21 16:12 c_schmitz Changeset attached => LimeSurvey 2.05 187bdc3e
2013-10-21 16:12 c_schmitz Note Added: 26880
2013-10-22 15:33 c_schmitz Note Added: 26908
2013-10-22 15:33 c_schmitz Status resolved => closed


Copyright © 2000 - 2014 MantisBT Team
Powered by Mantis Bugtracker