View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
14344Bug reportsInstallationpublic2020-03-06 00:43
Reporterritapas Assigned Tomarkusfluer 
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version3.15.x 
Fixed in Version3.22.7 
Summary14344: create-database.php creates table sessions with incorrect data type for field 'data' in MariaDB 5.5.60
Description

The create-database.php uses a database-independent script to create the limesurvey database with the required tables.
The sessions table is created as follows:
// sessions
$oDB->createCommand()->createTable('{{sessions}}', array(
'id' => "string(32) NOT NULL",
'expire' => "integer NULL",
'data' => "binary",
));

In our configuration, this lead to the creation of a sessions table where the "data" field is a blob while it should be a longblob. This causes issues while executing or previewing surveys if you import them. Surveys created by hand work in the expected way,

Steps To Reproduce

Install limesurvey on a machine with the same configuration, then check the sessions table in the database.
In alternative, after the installation

  • set 'debug'=>2 in config.php
    create a survey by importing an lss file and "preview it".
    You'll get this error message from CDbCommand :
    SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'data' at row 1. The SQL statement executed was: UPDATE sessions SET data=:data, expire=:expire WHERE id=:id
Additional Information

php packets:
rh-php71-php-pear-1.10.4-1.el7.noarch
rh-php71-php-mbstring-7.1.8-1.el7.x86_64
rh-php71-php-json-7.1.8-1.el7.x86_64
rh-php71-php-xml-7.1.8-1.el7.x86_64
rh-php71-php-gd-7.1.8-1.el7.x86_64
rh-php71-php-zip-7.1.8-1.el7.x86_64
rh-php71-php-process-7.1.8-1.el7.x86_64
rh-php71-php-fpm-7.1.8-1.el7.x86_64
rh-php71-php-pdo-7.1.8-1.el7.x86_64
rh-php71-php-mysqlnd-7.1.8-1.el7.x86_64
rh-php71-runtime-1-1.el7.x86_64
rh-php71-php-cli-7.1.8-1.el7.x86_64
rh-php71-1-1.el7.x86_64
rh-php71-php-ldap-7.1.8-1.el7.x86_64
rh-php71-php-common-7.1.8-1.el7.x86_64

Tagsinstallation.database
Bug heat6
Complete LimeSurvey version number (& build)Version 3.15.5+181115
I will donate to the project if issue is resolvedNo
Browser
Database type & version MariaDB 5.5.60
Server OS (if known)RHL7
Webserver software & version (if known)
PHP Versionrh-php71-1-1

Users monitoring this issue

ritapas

Activities

ritapas

ritapas

2018-12-12 15:46

reporter   ~49950

you must uncomment the following lines in config.php to enable table-based sessions.

            // Note: Table-based sessions are currently not supported on MSSQL server.
             'session' => array (
                     'class' => 'application.core.web.DbHttpSession',
                     'connectionID' => 'db',
                     'sessionTableName' => '{{sessions}}',
LouisGac

LouisGac

2019-01-10 16:18

developer   ~50159

Markus I assign it to you because you're the last one who edited this line:)
https://github.com/LimeSurvey/LimeSurvey/commit/73f053a9e725bd140161e89e71a12b40b0d202ad

ritapas

ritapas

2019-04-12 14:13

reporter   ~51457

I believe something similar happens in application/helpers/update/updatedb_helper.php because we experienced the same problems while upgrading the application db from a previous version, with the same configuration.
The table creation for mysql happens in row 686 but in this case the type for data is written as 'longtext'. Nevertheless, it is created as a "blob". With the blob type we weren't able to import some .lsa surveys. After an ALTER TABLE which set the type to "longblob", everything worked fine.

Issue History

Date Modified Username Field Change
2018-12-12 15:09 ritapas New Issue
2018-12-12 15:33 ritapas Issue Monitored: ritapas
2018-12-12 15:46 ritapas Note Added: 49950
2018-12-13 13:43 ritapas Tag Attached: installation.database
2019-01-10 16:17 LouisGac Assigned To => markusfluer
2019-01-10 16:17 LouisGac Status new => assigned
2019-01-10 16:18 LouisGac Note Added: 50159
2019-04-12 14:13 ritapas Note Added: 51457
2020-03-06 00:43 c_schmitz Status assigned => closed
2020-03-06 00:43 c_schmitz Resolution open => fixed
2020-03-06 00:43 c_schmitz Fixed in Version => 3.22.7
2021-08-02 17:18 guest Bug heat 4 => 6