Author Topic: Help: MDB2 Error  (Read 4249 times)

Offline davidmpaz

  • Jr. Member
  • **
  • Posts: 11
Help: MDB2 Error
« on: February 24, 2009, 03:30:49 PM »
Hello everybody.

Can someone tellme what can be these error.
Code: [Select]

[24-Feb-2009 19:04:01] PHP Notice:  Undefined index:  HTTPS in /var/www/web4/web/rcemail/program/include/iniset.php on line 56
[24-Feb-2009 19:04:03] PHP Notice:  Undefined index:  HTTPS in /var/www/web4/web/rcemail/program/include/iniset.php on line 56
[24-feb-2009 19:04:03] MDB2 Error: constraint violation (-3): _doQuery: [Error message: Could not execute statement]
[Last executed query: EXECUTE mdb2_statement_mysql_8087d51241fd40d06f9854ae8a8cab95507d3e3b5 USING @0, @1, @2, @3, @4, @5, @6, @7, @8, @9, @10]
[Native code: 1452]
[Native message: Cannot add or update a child row: a foreign key constraint fails (`web4db1/rcemail_messages`, CONSTRAINT `user_id_fk_messages` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE)]

[24-Feb-2009 19:04:03 +0000] DB Error: MDB2 Error: constraint violation Query: _doQuery: [Error message: Could not execute statement] [Last executed query: EXECUTE mdb2_statement_mysql_8087d51241fd40d06f9854ae8a8cab95507d3e3b5 USING @0, @1, @2, @3, @4, @5, @6, @7, @8, @9, @10] [Native code: 1452] [Native message: Cannot add or update a child row: a foreign key constraint fails (`web4db1/rcemail_messages`, CONSTRAINT `user_id_fk_messages` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE)]  in /var/www/web4/web/rcemail/program/include/rcube_mdb2.php on line 540 (GET /rcemail/?_task=mail)
[24-feb-2009 19:04:03] MDB2 Error: constraint violation (-3): _doQuery: [Error message: Could not execute statement]
[Last executed query: EXECUTE mdb2_statement_mysql_101ab1e25ce778d38754cdea8d754c379490a4ad13 USING @0, @1, @2, @3, @4, @5, @6, @7, @8, @9, @10]
[Native code: 1452]
[Native message: Cannot add or update a child row: a foreign key constraint fails (`web4db1/rcemail_messages`, CONSTRAINT `user_id_fk_messages` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE)]


when I login in the RC, and similar happen when creating an identity, because it is not created when user login the first time, as result I can not send/reply any message, I can read but not reply.

I will attachmy main config file, so please if someone could help me will be great.


Greetings David.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,856
Help: MDB2 Error
« Reply #1 on: February 25, 2009, 03:38:03 AM »
i think the problem might be that you have changed the names of the tables from their default to rcemail_* but you have not updated the references so mysql is looking for a table called users and not rcemail_users.

if you look at the sql file you will see stuff like this:
Code: [Select]
CONSTRAINT `user_id_fk_messages` FOREIGN KEY (`user_id`)
   REFERENCES `users`(`user_id`)

and you want something like this:
Code: [Select]
CONSTRAINT `user_id_fk_messages` FOREIGN KEY (`user_id`)
   REFERENCES `rcemail_users`(`user_id`)
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline davidmpaz

  • Jr. Member
  • **
  • Posts: 11
Help: MDB2 Error
« Reply #2 on: February 26, 2009, 09:49:11 AM »
Oh !!!!! thanks a lot , what a kind stupid am I ??? :D . Everything is going smoothly now.

Thanks again, David.

SUSAN

  • Guest
Help: MDB2 Error
« Reply #3 on: October 15, 2009, 03:30:42 PM »
a good site where you can find a very good type of stuff:)