6.0.0-alpha12
6/8/25

[#13353] Call to a member function queryCapability() on a non-object
Summary Call to a member function queryCapability() on a non-object
Queue IMP
Queue Version 6.2.0
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester ste (at) stefanorossi (dot) me
Created 07/11/2014 (3985 days ago)
Due
Updated 07/24/2014 (3972 days ago)
Assigned 07/11/2014 (3985 days ago)
Resolved 07/11/2014 (3985 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
07/24/2014 05:14:54 PM xk3 (at) mompl (dot) org Comment #6 Reply to this comment
Hi all

I'm on IMP 6.2.0 (this instance installed about two years ago, 
regularly updated since then) and had suddenly the same issues with 
the table horde_imap_client_data and duplicate entry '0' for key 
'PRIMARY' errors.

MariaDB [horde]> describe horde_imap_client_data;
+-----------+------------------+------+-----+---------+-------+
| Field     | Type             | Null | Key | Default | Extra |
+-----------+------------------+------+-----+---------+-------+
| messageid | int(10) unsigned | NO   | PRI | 0       |       |
..


Read in some tickets/mails that messageid was renamed from uid and 
thereby - as it seems - the autoincrement got lost somehow. I removed 
the default '0' and replaced it with autoincrement = high enough 
value. It's working again. Hope I didn't break anything surfacing 
later on.

Cheers
    Martin
07/11/2014 11:41:07 PM Michael Slusarz State ⇒ Not A Bug
 
07/11/2014 11:38:39 PM ste (at) stefanorossi (dot) me Comment #5 Reply to this comment
Update: after a few hours, the error changed to:
-------------------------------------------------------
ERR: HORDE [imp] SQL QUERY FAILED: SQLSTATE[23000]: Integrity 
constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY'
        INSERT INTO horde_imap_client_data (hostspec, mailbox, port, username)
          VALUES ('localhost', 'INBOX', '143', 'MY-USER') [pid 22691 on line 
204 of "/usr/share/php/Horde/Db/Adapter/Pdo/Base.php"]
-------------------------------------------------------
Following a post I found, I altered that table setting autoincrement 
on "messageid". Now it seems to be working...
07/11/2014 05:46:17 PM ste (at) stefanorossi (dot) me Comment #4 Reply to this comment
I'm not sure if the file got attached, here it is anyway:
http://pastebin.com/amM2Witc
07/11/2014 05:42:48 PM ste (at) stefanorossi (dot) me Comment #3 Reply to this comment

[Show Quoted Text - 9 lines]
Forgive me, what do you mean by upgrade over an active session? I 
upgraded the php5-* packages, then restarted php5-fpm. I didn't know 
there were other steps involved.

Attached you can find a portion of the log. I set the logging level to 
DEBUG, cleared the log file then clicked on "Mail" on the top bar, and 
that's what I get.

Thanks for your help.
07/11/2014 05:32:40 PM Michael Slusarz Comment #2
Priority ⇒ 1. Low
State ⇒ Feedback
Reply to this comment
Do you have any ideas on how to fix that?
No.  Something is very wrong with your setup if you are getting that 
issue.  You didn't upgrade over an active session did you?

At a minimum you will need to provide the full backtrace of this error 
(set Horde error logging to DEBUG level).


07/11/2014 05:21:52 PM ste (at) stefanorossi (dot) me Comment #1
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ Call to a member function queryCapability() on a non-object
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
I've just upgraded to PHP5.5. IMP says "Error when communicating with 
the server", and I get this in the log:
-------------------------------------------
EMERG: HORDE [imp] Call to a member function queryCapability() on a 
non-object [pid 15084 on line 231 of "/var/www/horde/imp/lib/Imap.php"]
-------------------------------------------
Do you have any ideas on how to fix that?
Thanks

Saved Queries