6.0.0-git
2019-04-25

[#9937] when caching is enabled for a server in backends exception is logged
Summary when caching is enabled for a server in backends exception is logged
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester michael (at) bigmichi1 (dot) de
Created 2011-04-19 (2928 days ago)
Due
Updated 2011-07-15 (2841 days ago)
Assigned 2011-07-01 (2855 days ago)
Resolved 2011-07-01 (2855 days ago)
Milestone
Patch No

History
2011-07-15 13:59:48 jives (at) gmx (dot) at Comment #6 Reply to this comment
Try to use pdo_mysql instead of mysqli.
That leads to the same JSON data reply, but with a different error at the end:

Fatal error: Uncaught exception 'Horde_Db_Exception' with message 
'QUERY FAILED:

INSERT INTO horde_cache (cache_id, cache_timestamp, cache_expiration, 
cache_data) VALUES ('', 1310737654, 1311342454, '')' in 
/usr/share/pear/Horde/Db/Adapter/Mysql.php:258
Stack trace:
#0 /usr/share/pear/Horde/Db/Adapter/Mysql.php(281): 
Horde_Db_Adapter_Mysql->execute('INSERT INTO hor...', Array, NULL)
#1 /usr/share/pear/Horde/Cache/Storage/Sql.php(160): 
Horde_Db_Adapter_Mysql->insert('INSERT INTO hor...', Array)
#2 /usr/share/pear/Horde/Cache.php(131): 
Horde_Cache_Storage_Sql->set('horde_imap_clie...', 
'?a:50:{i:1840;a...', 604800)
#3 /usr/share/pear/Horde/Imap/Client/Cache.php(166): 
Horde_Cache->set('horde_imap_clie...', 'a:50:{i:1840;a:...', 604800)
#4 [internal function]: Horde_Imap_Client_Cache->__destruct()
#5 {main}

Next exception 'Horde_Cache_Exception' with message 'QUERY FAILED:

INSERT INTO horde_cache (cache_id, cache_timestamp, cache_expiration, 
cache_data) VALUES ('', 1310737654, 1311342454, '')' in 
/usr/share/pear/Horde/Ca in 
/usr/share/pear/Horde/Cache/Storage/Sql.php on line 162

The table schemas are up to date according to the Horde configuration 
UI, but the problem is maybe somewhere else anyway, because if i run 
the exact same query manually, it succeeds.
2011-07-15 08:55:44 Jan Schneider Comment #5 Reply to this comment
Try to use pdo_mysql instead of mysqli.
2011-07-15 08:47:00 jives (at) gmx (dot) at Comment #4 Reply to this comment
I still get this error, running on H4.0.7 with imp 5.0.8 and caching 
enabled in the backend configuration. The JSON returned by the server 
looks fine though, except the error message at the end:

/*-secure-{"response":{"ViewPort":{"cacheid":"V1243203288|H1992|12|0","data":
[...]
,"metadata":{"readonly":0},"rowlist":
[...]
,"totalrows":73,"view":"INBOX","update":1},"poll":{"INBOX":0}}}*/
Fatal error: Call to a member function real_escape_string() on a 
non-object in /usr/share/pear/Horde/Db/Adapter/Mysqli.php on line 194

I cut out the data and metadata itself, but it looks like perfectly 
valid JSON and the data in there seems also correct.

As you can see, I am using msqli, with SQL caching enabled:

$conf['cache']['default_lifetime'] = 86400;
$conf['cache']['params']['driverconfig'] = 'horde';
$conf['cache']['driver'] = 'Sql';
$conf['cache']['compress'] = true;
$conf['cache']['use_memorycache'] = '';

The mailserver is an SSL enabled IMAP server.

Output of "grep imp /var/log/horde/horde.log"

2011-07-15T10:44:55+02:00 DEBUG: HORDE [imp] Load config file 
(conf.php; app: imp) [pid 2285 on line 860 of 
"/usr/share/pear/Horde.php"]
2011-07-15T10:44:55+02:00 DEBUG: HORDE [imp] SQL  (0.0008s)
2011-07-15T10:44:55+02:00 DEBUG: HORDE [imp] Cache hit: 
MQSREGf-r2BOH-isUsJgjtA (Id 2e073ef8666002a7b90f675fbee35afe newer 
than 1310633095) [pid 2285 on line 122 of 
"/usr/share/pear/Horde/Cache/Storage/Sql.php"]
2011-07-15T10:44:56+02:00 DEBUG: HORDE [imp] SQL  (0.0008s)
2011-07-15T10:44:56+02:00 DEBUG: HORDE [imp] Cache hit: imp|silver (Id 
cf48e8223f4d6b406048f2a24dfc797a newer than 1310114696) [pid 2285 on 
line 122 of "/usr/share/pear/Horde/Cache/Storage/Sql.php"]
2011-07-15T10:44:56+02:00 DEBUG: HORDE [imp] SQL  (0.0011s)
2011-07-15T10:44:56+02:00 DEBUG: HORDE [imp] Max memory usage: 
19660800 bytes [pid 2285 on line 473 of 
"/usr/share/pear/Horde/Registry.php"]

Please let me know if you need additional information.
2011-07-01 20:09:14 Jan Schneider State ⇒ Not A Bug
 
2011-07-01 17:38:54 michael (at) bigmichi1 (dot) de Comment #3 Reply to this comment
i haven't seen this error for 3 weeks now, i think this has been fixed 
i a prevous release. not sure, so close this one
2011-07-01 16:58:21 Jan Schneider Comment #2
State ⇒ Feedback
Version ⇒ Git master
Reply to this comment
Do you still see this?
2011-04-20 04:35:14 Michael Slusarz Version ⇒
Queue ⇒ Horde Framework Packages
 
2011-04-19 18:45:37 michael (at) bigmichi1 (dot) de Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ when caching is enabled for a server in backends exception is logged
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
Reply to this comment
[Tue Apr 19 20:41:38 2011] [error] [client 0.0.0.0] PHP Fatal error:   
Call to a member function real_escape_string() on a non-object in 
/var/www/pear/php/Horde/Db/Adapter/Mysqli.php on line 194, referer: 
https://xxx/services/portal/index.php
[Tue Apr 19 20:41:38 2011] [error] [client 0.0.0.0] PHP Stack trace:, 
referer: https://xxx/services/portal/index.php
[Tue Apr 19 20:41:38 2011] [error] [client 0.0.0.0] PHP   1. {main}() 
/var/www/horde4/imp/index.php:0, referer: 
https://xxx/services/portal/index.php
[Tue Apr 19 20:41:38 2011] [error] [client 0.0.0.0] PHP   2. require() 
/var/www/horde4/imp/index.php:19, referer: 
https://xxx/services/portal/index.php
[Tue Apr 19 20:41:38 2011] [error] [client 0.0.0.0] PHP   3. 
Horde_Imap_Client_Cache->__destruct() 
/var/www/pear/php/Horde/Imap/Client/Cache.php:0, referer: 
https://xxx/services/portal/index.php
[Tue Apr 19 20:41:38 2011] [error] [client 0.0.0.0] PHP   4. 
Horde_Cache->set() /var/www/pear/php/Horde/Imap/Client/Cache.php:174, 
referer: https://xxx/services/portal/index.php
[Tue Apr 19 20:41:38 2011] [error] [client 0.0.0.0] PHP   5. 
Horde_Cache_Storage_Stack->set() 
/var/www/pear/php/Horde/Cache.php:131, referer: 
https://xxx/services/portal/index.php
[Tue Apr 19 20:41:38 2011] [error] [client 0.0.0.0] PHP   6. 
Horde_Cache_Storage_Sql->set() 
/var/www/pear/php/Horde/Cache/Storage/Stack.php:72, referer: 
https://xxx/services/portal/index.php
[Tue Apr 19 20:41:38 2011] [error] [client 0.0.0.0] PHP   7. 
Horde_Db_Adapter_Base->delete() 
/var/www/pear/php/Horde/Cache/Storage/Sql.php:150, referer: 
https://xxx/services/portal/index.php
[Tue Apr 19 20:41:38 2011] [error] [client 0.0.0.0] PHP   8. 
Horde_Db_Adapter_Mysqli->execute() 
/var/www/pear/php/Horde/Db/Adapter/Base.php:622, referer: 
https://xxx/services/portal/index.php
[Tue Apr 19 20:41:38 2011] [error] [client 0.0.0.0] PHP   9. 
Horde_Db_Adapter_Base->_replaceParameters() 
/var/www/pear/php/Horde/Db/Adapter/Mysqli.php:301, referer: 
https://xxx/services/portal/index.php
[Tue Apr 19 20:41:38 2011] [error] [client 0.0.0.0] PHP  10. 
Horde_Db_Adapter_Mysqli->quote() 
/var/www/pear/php/Horde/Db/Adapter/Base.php:766, referer: 
https://xxx/services/portal/index.php
[Tue Apr 19 20:41:38 2011] [error] [client 0.0.0.0] PHP  11. 
Horde_Db_Adapter_Base->__call() 
/var/www/pear/php/Horde/Db/Adapter/Base.php:766, referer: 
https://xxx/services/portal/index.php
[Tue Apr 19 20:41:38 2011] [error] [client 0.0.0.0] PHP  12. 
call_user_func_array() 
/var/www/pear/php/Horde/Db/Adapter/Base.php:255, referer: 
https://xxx/services/portal/index.php
[Tue Apr 19 20:41:38 2011] [error] [client 0.0.0.0] PHP  13. 
Horde_Db_Adapter_Base_Schema->quote() 
/var/www/pear/php/Horde/Db/Adapter/Base.php:255, referer: 
https://xxx/services/portal/index.php
[Tue Apr 19 20:41:38 2011] [error] [client 0.0.0.0] PHP  14. 
Horde_Db_Adapter_Mysqli->quoteString() 
/var/www/pear/php/Horde/Db/Adapter/Base/Schema.php:196, referer: 
https://xxx/services/portal/index.php

Saved Queries