Author Topic: Problem with SVN 2468+  (Read 6052 times)

Offline dano

  • Full Member
  • ***
  • Posts: 124
Problem with SVN 2468+
« on: May 13, 2009, 12:41:59 PM »
Hello,

I have been running SVN for quite some time now with no or minimal troubles up until yesterday.  Now when I try to log in it will log me in and display the inbox but then dump me right back out.

Here are the errors in the Apache error log:
Code: [Select]
MDB2 Error: constraint violation (-3): _doQuery: [Error message: Could not execute statement], referer: http://domain.com/rcmail/?_task=mail
[Last executed query: EXECUTE MDB2_STATEMENT_mysql_ea6e41d1580a9ce2eff48cf830d5fff4e5f545e24 USING @0, @1, @2], referer: http://domain.com/rcmail/?_task=mail
[Native code: 1062], referer: http://domain.com/rcmail/?_task=mail
[Native message: Duplicate entry 'a90076ff59397fa9bb1362f5e2b4d74c' for key 1], referer: http://domain.com/rcmail/?_task=mail
, referer: http://domain.com/rcmail/?_task=mail
PHP Notice:  MDB2 Error: constraint violation Query: _doQuery: [Error message: Could not execute statement] [Last executed query: EXECUTE MDB2_STATEMENT_mysql_ea6e41d1580a9ce2eff48cf830d5fff4e5f545e24 USING @0, @1, @2] [Native code: 1062] [Native message: Duplicate entry 'a90076ff59397fa9bb1362f5e2b4d74c' for key 1]  in /usr/local/share/htdocs/rcmail/program/include/bugs.inc on line 104, referer: http://clanmorgan.us/rcmail/?_task=mail

The only thing I could find related to a MDB2 contstraint violation was in regards to the cache so I tried disabling it and even deleting the records in it but that was no help.

Is anyone else seeing this or have any idea what I need to do to fix it?

Thanks!

Dan

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Problem with SVN 2468+
« Reply #1 on: May 14, 2009, 01:02:26 AM »
Try to truncate "messages", "cache" and "session" database table.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline lacri

  • Full Member
  • ***
  • Posts: 179
    • http://www.php-lexikon.de
Problem with SVN 2468+
« Reply #2 on: May 14, 2009, 02:47:08 AM »
I have write and discussed with alec over this problem i have the same and test the problem is array_merge by me i use PHP 5.2.8-pl2 after array_merge in session.inc on line 72 the array are empty Roundcube saves the empty array in the Database and read this and can not update this and will insert a new entry ... and the error is key already exists.

a solution replaced in program/include/session.inc in line 72
 rcube_sess_serialize (array_merge (rcube_sess_unserialize ($oldvars), rcube_sess_unserialize ($vars))),

with

$vars,

is a small workaround

I test it today that exactly.

What a PHP Version have you

Offline lacri

  • Full Member
  • ***
  • Posts: 179
    • http://www.php-lexikon.de
Problem with SVN 2468+
« Reply #3 on: May 14, 2009, 04:32:32 AM »
i found the cause ... suhoshin

the saved session vars in DB canot unserialized are
encrypted by suhoshin.

Hardened-PHP Project - PHP Security - Suhosin

the parameter suhoshin.session.encrypt
Hardened-PHP Project - PHP Security - Configuration

i have deactivate suhoshin.session.encrypt now works

this is not good i will not deaktivate the suhoshin.session.encrypt

a little workaround ...

add this to .htaccess in roundcube root
php_value suhosin.session.encrypt Off

is fixed in http://trac.roundcube.net/changeset/2478/
« Last Edit: May 14, 2009, 07:20:04 AM by lacri »

Offline dano

  • Full Member
  • ***
  • Posts: 124
Problem with SVN 2468+
« Reply #4 on: May 14, 2009, 05:53:43 PM »
Hello Lacri,

I do believe you are correct that it is Suhosin causing this error.  Unfortunately after installing the latest .htaccess it did not fix it for me.  I was able to get it working by putting suhosin.session.encrypt = off into the main php.ini but do not want to do that permanently on the whole server.

I'm on a cPanel server which is running PHP as CGI so I tried putting the directives into a php.ini file but so far nothing seems to work.  I'm burnt on it for today so will try again later.

Thanks