- Posts: 6
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Limesurvey try to update database without request.
- mdre
- Topic Author
- Offline
- New Member
Less
More
8 years 1 week ago #134745
by mdre
Limesurvey try to update database without request. was created by mdre
Hi all!
We have a problem. Today Limesurvey start to request to update database when you try to login at the /admin page without any request. And worst of that is that it fail in the process.
We have LS 2.5 working well until friday. Today start with this page:
And if yo click the button, it say:
An non-recoverable error happened during the update. Error details:
CDbCommand failed to execute the SQL statement: SQLSTATE[42601]: Syntax error: 7 ERROR: error de sintaxis en o cerca de «NOT» LINE 1: ... COLUMN "users_name" TYPE character varying (64) NOT NULL ^. The SQL statement executed was: ALTER TABLE "lime_users" ALTER COLUMN "users_name" TYPE character varying (64) NOT NULL
Please fix this error in your database and try again
Any idea? How could we stop the upgrade and why this process start?
We have a problem. Today Limesurvey start to request to update database when you try to login at the /admin page without any request. And worst of that is that it fail in the process.
We have LS 2.5 working well until friday. Today start with this page:
And if yo click the button, it say:
An non-recoverable error happened during the update. Error details:
CDbCommand failed to execute the SQL statement: SQLSTATE[42601]: Syntax error: 7 ERROR: error de sintaxis en o cerca de «NOT» LINE 1: ... COLUMN "users_name" TYPE character varying (64) NOT NULL ^. The SQL statement executed was: ALTER TABLE "lime_users" ALTER COLUMN "users_name" TYPE character varying (64) NOT NULL
Please fix this error in your database and try again
Any idea? How could we stop the upgrade and why this process start?
Attachments:
The topic has been locked.
- ollehar
- Offline
- LimeSurvey GmbH Employee
Less
More
- Posts: 522
- Thank you received: 108
8 years 1 week ago #134748
by ollehar
Replied by ollehar on topic Limesurvey try to update database without request.
Hi!
Can you dump the content of file application/config/version.php please? Especially dbversionumber.
Can you dump the content of file application/config/version.php please? Especially dbversionumber.
The topic has been locked.
- mdre
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
8 years 1 week ago #134749
by mdre
Replied by mdre on topic Limesurvey try to update database without request.
<?php
/*
* LimeSurvey
* Copyright (C) 2007-2011 The LimeSurvey Project Team / Carsten Schmitz
* All rights reserved.
* License: GNU/GPL License v2 or later, see LICENSE.php
* LimeSurvey is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*150413
*/
$config = "2.50+";
$config = 257;
$config = '160317';
$config = true;
//$config = 1;
return $config;
?>
/*
* LimeSurvey
* Copyright (C) 2007-2011 The LimeSurvey Project Team / Carsten Schmitz
* All rights reserved.
* License: GNU/GPL License v2 or later, see LICENSE.php
* LimeSurvey is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*150413
*/
$config = "2.50+";
$config = 257;
$config = '160317';
$config = true;
//$config = 1;
return $config;
?>
The topic has been locked.
- ollehar
- Offline
- LimeSurvey GmbH Employee
Less
More
- Posts: 522
- Thank you received: 108
8 years 1 week ago #134750
by ollehar
Replied by ollehar on topic Limesurvey try to update database without request.
Hi,
This file is totally corrupt. The $config variable is missing the array keys. Here's an example of a correct file:
$config = "2.50+";
$config = 257;
$config = '160317';
$config = true;
$config = 4;
return $config;
This file is totally corrupt. The $config variable is missing the array keys. Here's an example of a correct file:
$config = "2.50+";
$config = 257;
$config = '160317';
$config = true;
$config = 4;
return $config;
The topic has been locked.
- ollehar
- Offline
- LimeSurvey GmbH Employee
Less
More
- Posts: 522
- Thank you received: 108
8 years 1 week ago #134751
by ollehar
Replied by ollehar on topic Limesurvey try to update database without request.
Wait, the forum is messing with the post, stripping the [ and ].
The topic has been locked.
- ollehar
- Offline
- LimeSurvey GmbH Employee
Less
More
- Posts: 522
- Thank you received: 108
8 years 1 week ago #134752
by ollehar
Replied by ollehar on topic Limesurvey try to update database without request.
Could you enable debug=2 in application/config/config.php and try to update again? Then post your error message here. Thanks.
The topic has been locked.
- mdre
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
8 years 1 week ago #134753
by mdre
Replied by mdre on topic Limesurvey try to update database without request.
the same error:
An non-recoverable error happened during the update. Error details:
CDbCommand failed to execute the SQL statement: SQLSTATE[42601]: Syntax error: 7 ERROR: error de sintaxis en o cerca de «NOT» LINE 1: ... COLUMN "users_name" TYPE character varying (64) NOT NULL ^. The SQL statement executed was: ALTER TABLE "lime_users" ALTER COLUMN "users_name" TYPE character varying (64) NOT NULL
but, if you add the sqldebug=1 it dump some more data.
An non-recoverable error happened during the update. Error details:
CDbCommand failed to execute the SQL statement: SQLSTATE[42601]: Syntax error: 7 ERROR: error de sintaxis en o cerca de «NOT» LINE 1: ... COLUMN "users_name" TYPE character varying (64) NOT NULL ^. The SQL statement executed was: ALTER TABLE "lime_users" ALTER COLUMN "users_name" TYPE character varying (64) NOT NULL
but, if you add the sqldebug=1 it dump some more data.
Attachments:
The topic has been locked.
- mdre
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
8 years 1 week ago - 8 years 1 week ago #134756
by mdre
Replied by mdre on topic Limesurvey try to update database without request.
The PostgreSql statement has an error. It's not valid to set column type an not null at the same type. One correct statement would be:
ALTER TABLE "lime_users" ALTER COLUMN "users_name" TYPE character varying (64), ALTER COLUMN "users_name" SET NOT NULL;
but, why it start an update? We do not start it.
ALTER TABLE "lime_users" ALTER COLUMN "users_name" TYPE character varying (64), ALTER COLUMN "users_name" SET NOT NULL;
but, why it start an update? We do not start it.
Last edit: 8 years 1 week ago by mdre.
The topic has been locked.
- ollehar
- Offline
- LimeSurvey GmbH Employee
Less
More
- Posts: 522
- Thank you received: 108
8 years 1 week ago #134758
by ollehar
Replied by ollehar on topic Limesurvey try to update database without request.
OK, I would guess you made an update somehow, and now it wants to update to the next version. One hacky solution is to brutally change the dbversionnumber to 258, which is the latest one, and then manually do the update. It's just the removal of a value in global settings to show the bottom icon correctly.
The topic has been locked.
- ollehar
- Offline
- LimeSurvey GmbH Employee
Less
More
- Posts: 522
- Thank you received: 108
8 years 1 week ago #134760
by ollehar
Replied by ollehar on topic Limesurvey try to update database without request.
Or wait, before you do anything, could you check the value in settings_global, stg_name = 'DBVersion'? It should be 257, but maybe it's been changed accidentally (hope not).
The topic has been locked.
- mdre
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
8 years 1 week ago #134762
by mdre
Replied by mdre on topic Limesurvey try to update database without request.
where is that value? The table lime_settings_globals is the most near but it do not have that value.
The topic has been locked.
- ollehar
- Offline
- LimeSurvey GmbH Employee
Less
More
- Posts: 522
- Thank you received: 108
8 years 1 week ago - 8 years 1 week ago #134763
by ollehar
Replied by ollehar on topic Limesurvey try to update database without request.
SELECT * FROM lime_settings_global WHERE stg_name = 'DBVersion';
If you have no such value, you have to create it! Insert stg_value = 257 with stg_name = 'DBVersion'.
If you have no such value, you have to create it! Insert stg_value = 257 with stg_name = 'DBVersion'.
Last edit: 8 years 1 week ago by ollehar.
The following user(s) said Thank You: mdre
The topic has been locked.