Author Topic: Identity can't be saved SQL problem?  (Read 29751 times)

Offline quwax

  • Jr. Member
  • **
  • Posts: 24
Identity can't be saved SQL problem?
« on: September 19, 2012, 05:18:15 AM »
Hello,
I can't save identies and always get the know error:
An error occured saving (in German ;-)
I updated roundcube from 0.7.2 -> 0.8.1
during the update I've seen 2 php warnings:
PHP Startup: Unable to load dynamic library '/usr/local/php5/lib/php/extensions/no-debug-non-zts-20100525/proxyauth.so' - dlopen(/usr/local/php5/lib/php/extensions/no-debug-non-zts-20100525/proxyauth.so, 9): image not found in Unknown on line 0
PHP Warning:  date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/share/roundcubemail-0.8.1/program/include/rcube_config.php on line 408

anyway, how can I fix that identity problem?
Everything else seams to run smooth.

thanks
quwax

Offline quwax

  • Jr. Member
  • **
  • Posts: 24
Re: Identity can't be saved SQL problem?
« Reply #1 on: September 20, 2012, 09:21:04 PM »
Hello again,

do i have to post this under release discussion to get some input how to solve that issue?

btw. old settings are still there, but they neither can be changed or nor can new ones be set for accounts which still don't have any.

thanks
quwax

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Re: Identity can't be saved SQL problem?
« Reply #2 on: September 20, 2012, 11:52:31 PM »
Whats in your RoundCube error log?

Offline quwax

  • Jr. Member
  • **
  • Posts: 24
Re: Identity can't be saved SQL problem?
« Reply #3 on: September 22, 2012, 12:34:42 AM »
I see this here:
[22-Sep-2012 04:27:07 UTC] MDB2 Error: no such field (-19): _doQuery: [Error message: Could not execute statement]
[Last executed query: UPDATE identities SET changed = now(), `name` = 'quwax', `email` = 'quwax.xxxx.de', `organization` = '', `reply-to` = '', `bcc` = '', `standard` = '1', `signature` = '', `html_signature` = 0 WHERE identity_id = '1' AND user_id = '1' AND del <> 1]
[Native code: 1054]
[Native message: Unknown column 'changed' in 'field list']
and in the sql-log:
[22-Sep-2012 04:27:07 +0000]: query(1): UPDATE identities SET changed = now(), `name` = 'quwax', `email` = 'quwax@xxxxx.de', `organization` = '', `reply-to` = '', `bcc` = '', `standard` = '1', `signature` = '', `html_signature` = 0 WHERE identity_id = '1' AND user_id = '1' AND del <> 1;
[22-Sep-2012 04:27:07 +0000]: query(1): SELECT * FROM identities WHERE del <> 1 AND user_id = '1' AND identity_id = 1 ORDER BY `standard` DESC, name ASC, identity_id ASC;

the funny thing is, the field is read, but can't be written?
thanks
quwax

Offline quwax

  • Jr. Member
  • **
  • Posts: 24
Re: Identity can't be saved SQL problem?
« Reply #4 on: September 22, 2012, 12:49:03 AM »
so I'm just checking the databse and it looks like this:
mysql> show columns from identities;
+----------------+------------------+------+-----+---------+----------------+
| Field          | Type             | Null | Key | Default | Extra          |
+----------------+------------------+------+-----+---------+----------------+
| identity_id    | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| del            | tinyint(1)       | NO   |     | 0       |                |
| standard       | tinyint(1)       | NO   |     | 0       |                |
| name           | varchar(128)     | NO   |     | NULL    |                |
| organization   | varchar(128)     | NO   |     |         |                |
| email          | varchar(128)     | NO   |     | NULL    |                |
| reply-to       | varchar(128)     | NO   |     |         |                |
| bcc            | varchar(128)     | NO   |     |         |                |
| signature      | text             | YES  |     | NULL    |                |
| html_signature | tinyint(1)       | NO   |     | 0       |                |
| user_id        | int(10) unsigned | NO   | MUL | 0       |                |
+----------------+------------------+------+-----+---------+----------------+

what I see is that default is set to NULL with 4 fields and NULL is not allowed and no field changed?
thanks
quwax



Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Re: Identity can't be saved SQL problem?
« Reply #5 on: September 22, 2012, 04:34:32 AM »
The error says that there is no "changed" column in the database, which from the looks of it there isn't. The "changed" column was added in version 0.4 so I'm not sure why its missing. How old is the original RoundCube install?

Offline quwax

  • Jr. Member
  • **
  • Posts: 24
Re: Identity can't be saved SQL problem?
« Reply #6 on: September 22, 2012, 07:17:51 AM »
I think the first installed version was 0.3 or something like that.
I mean I probably can add the column via mysql with alter table and add column
thanks
quwax

Offline quwax

  • Jr. Member
  • **
  • Posts: 24
Re: Identity can't be saved SQL problem?
« Reply #7 on: September 23, 2012, 03:38:34 AM »
I tried to insert the field but mysql always throws a syntax error and I'm not a mysql expert ;-)
Before I search and try ... what' the right syntax and type of the field etc ...
thanks
quwax

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Re: Identity can't be saved SQL problem?
« Reply #8 on: September 23, 2012, 02:55:42 PM »
Here is the query:
Code: [Select]
ALTER TABLE `identities` ADD `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00' AFTER `user_id`;

Offline quwax

  • Jr. Member
  • **
  • Posts: 24
Re: Identity can't be saved SQL problem?
« Reply #9 on: September 24, 2012, 09:40:26 AM »
thanks works now :-)
quwax