Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

3 036 LimeSurvey 7: Updating an existing database failed

More
3 months 2 weeks ago #273706 by riqcles
Please help us help you and fill where relevant:
LimeSurvey version: LimeSurvey Community Edition [url=https://192.168.56.113/limesurvey7/index.php/admin/databaseupdate/sa/db#modalSystemInformation] Version 7.0.0-beta1+260121 [/url]]
Own server:
Survey theme/template: vanilla
==================

I tested updating my LimeSurvey installation (in a VM).

I got an error (see end of message).

I tried again, installing a clean version 6.15.22.

I imported 4 questionnaires, then installed version 7.

No problem updating the database.

So, the problem seems to be with one or more of my questionnaires, but I have over 3,000.

Debugging enabled or disabled makes no difference. There's nothing in the Postgres logs.

I disabled the update in the config.ini file, to no avail.

I might be an isolated case, so if others are experiencing this, we could report the bug.

P.S.: The release_notes.txt file for version 6.16.5 is empty.

P.S. 2: Should we add a section dedicated to version 7 to the bug tracker?

Error message:

///////////////////////////////////////////

Update pgsql:host=serveurBdd;port=5432;user=limesurvey7;password=limesurvey7;dbname=limesurvey7; with prefix :lime_ from 640 to 700
PHP Error[2]: Undefined array key 0 
in file /var/www/html/limesurvey7/application/helpers/common_helper.php at line 1425
#0 /var/www/html/limesurvey7/vendor/yiisoft/yii/framework/base/CApplication.php(832): CErrorHandler->handle()
#1 /var/www/html/limesurvey7/application/helpers/common_helper.php(1425): ConsoleApplication->handleError()
#2 /var/www/html/limesurvey7/application/helpers/update/updates/Update_700.php(1074): getFieldName()
#3 /var/www/html/limesurvey7/application/helpers/update/DatabaseUpdateBase.php(47): LimeSurvey\Helpers\Update\Update_700->up()
#4 /var/www/html/limesurvey7/application/helpers/update/updatedb_helper.php(88): LimeSurvey\Helpers\Update\Update_700->safeUp()
#5 /var/www/html/limesurvey7/application/commands/UpdateDbCommand.php(46): db_upgrade_all()
#6 /var/www/html/limesurvey7/vendor/yiisoft/yii/framework/console/CConsoleCommandRunner.php(71): UpdateDBCommand->run()
#7 /var/www/html/limesurvey7/vendor/yiisoft/yii/framework/console/CConsoleApplication.php(92): CConsoleCommandRunner->run()
#8 /var/www/html/limesurvey7/vendor/yiisoft/yii/framework/base/CApplication.php(185): ConsoleApplication->processRequest()
#9 /var/www/html/limesurvey7/application/commands/console.php(77): ConsoleApplication->run()
[root@serveurIntranet config]#

/////////////////////////////////////////

Your system configuration: 
LimeSurvey version : 251103
Operating system
Linux Intranet server 5.14.0-611.16.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Dec 22 12:21:56 UTC 2025 x86_64
PHP version 8.2.30
Web Server Name 192.168.56.113
Web Server Software Apache/2.4.62 (Rocky Linux) OpenSSL/3.5.1
Web Server Information Database Driver pgsql
Database Connector Version 17.7
Database Server Information PID: 2314; Client Encoding: UTF8; Is Superuser: on; Session Authorization: postgres; Date Style: ISO, MDY
Database Server Version 17.7

////////////////////////////////////////////////

 

LimeSurvey version 6.15.x6
OS : RockyLinux / PHP 8.2.X
BDD : PostGresql 17.x /

Future LimeSurvey version 6.17.x
OS : RockyLinux / PHP 8.4.X
BDD : PostGresql 17.x /
The following user(s) said Thank You: hellencharless

Please Log in to join the conversation.

More
2 months 3 weeks ago #273877 by riqcles
Good evening,
is no one else experiencing a similar problem?
Has anyone tested migrating an existing PostgreSQL database from version 6 to version 7?
If a test has been performed, was it with a large number of existing questionnaires?
Because I still can't identify which questionnaire(s) might be preventing the database update.

LimeSurvey version 6.15.x6
OS : RockyLinux / PHP 8.2.X
BDD : PostGresql 17.x /

Future LimeSurvey version 6.17.x
OS : RockyLinux / PHP 8.4.X
BDD : PostGresql 17.x /

Please Log in to join the conversation.

More
4 days 7 hours ago #274348 by Mazi
Hi there,
we are not using PostGresql so we can not help much. It looks like your issue is related to a certain survey only and with a smaller database with less surveys everything is running fine?
Could this also be a timeout issue during the DB updtae leading to the error or can you safely reproduce this?

In any way, we do NOT recommend to update to version 7 of Limesurvey yet. The reasons are outlined at survey-consulting.com/limesurvey-7-migration/

We will update that overview from time to time and will add further details.
I will also post an update here if one of our customers is facing similar issues with PostGresql.

Best regards/Beste Grüße,
Dr. Marcel Minke
survey-consulting.com
offlinesurveys.com
Feel free to contact me by email for professional LimeSurvey support!

Please Log in to join the conversation.

More
1 day 11 hours ago #274361 by DenisChenu
Hi,

Issue : 
  1. With a lot of surveys , updating to 7/X take a long, long time, then update via www can not be done
  2. Update via CLI : error are not shown , just broke and didn't shown the exact SQL error : must be fixed
I think you already reported #1 ? I think we lmust fid nimprovment here.
About 2 : www.limesurvey.org/manual/Optional_settings/en#Logging_settings inside component array.

#2 must be reported too. But  PHP Error[2]: Undefined array key 0 happen only if E_NOTICE is set in error. You can disable it in your php.ini for CLI.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.

Please Log in to join the conversation.

More
1 day 8 hours ago #274363 by riqcles
No, I didn't report that problem, but another one concerning data integrity with a large database:

forums.limesurvey.org/forum/french-forum...de-nombreuses-tables
I had put it aside while manually cleaning up the oldest questionnaires.

But it's still relevant.

The submitted bug is: bugs.limesurvey.org/view.php?id=12393
almost 10 years old :)

Regarding problem 2:
In production, I have E_ALL & ~E_DEPRECATED. I don't think I can disable E_NOTICE (but we'll try).
For development, I made the change in my php.ini file, but the problem persists. In CLI mode, the script runs and then stops after about 3 minutes with the same error.

I will submit a bug report.

LimeSurvey version 6.15.x6
OS : RockyLinux / PHP 8.2.X
BDD : PostGresql 17.x /

Future LimeSurvey version 6.17.x
OS : RockyLinux / PHP 8.4.X
BDD : PostGresql 17.x /

Please Log in to join the conversation.

More
1 day 7 hours ago #274364 by DenisChenu
Can you check 
Code:
php --ini
to be sure to update the good php.ini ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.

Please Log in to join the conversation.

More
1 day 7 hours ago #274365 by riqcles

LimeSurvey version 6.15.x6
OS : RockyLinux / PHP 8.2.X
BDD : PostGresql 17.x /

Future LimeSurvey version 6.17.x
OS : RockyLinux / PHP 8.4.X
BDD : PostGresql 17.x /

Please Log in to join the conversation.

More
3 hours 59 minutes ago #274373 by riqcles
Sorry i'm late :)

I modified my configuration to rerun the tests:
Still using Rocky 9.7, but I'm switching to:

PHP 8.4.21 (cli) (built: May 5 2026 16:34:12) (NTS gcc x86_64)

limesurvey7.0.0-RC1+260430

I'm increasing the file server memory from 2 GB to 16 GB.

(The database server remains at 2 GB and Postgres 17.7.)

I'm removing php-fpm to be as close as possible to my environments.

I modify the php.ini file by adding:

max_input_time = 300
memory_limit = 2048 M
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE

I enable 'debug'=>2 in the config file.

And I rerun the update via the command line.

Now the log file in runtime directory is ok :)

LimeSurvey version 6.15.x6
OS : RockyLinux / PHP 8.2.X
BDD : PostGresql 17.x /

Future LimeSurvey version 6.17.x
OS : RockyLinux / PHP 8.4.X
BDD : PostGresql 17.x /

Please Log in to join the conversation.

Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose