6.0.0-beta1
7/7/25

[#7181] Fatal error: Cannot use object of type PEAR_Error as array in /usr/share/horde3/lib/Horde/IMAP/Cache.php on line 80
Summary Fatal error: Cannot use object of type PEAR_Error as array in /usr/share/horde3/lib/Horde/IMAP/Cache.php on line 80
Queue Horde Framework Packages
Queue Version FRAMEWORK_3
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester x5pcjr3t1nvsqf0 (at) bodhi (dot) lawlita (dot) com
Created 08/10/2008 (6175 days ago)
Due
Updated 04/21/2009 (5921 days ago)
Assigned 03/10/2009 (5963 days ago)
Resolved 03/16/2009 (5957 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
04/21/2009 07:50:28 AM vlarck (at) gmail (dot) com Comment #22 Reply to this comment
Hi,

History of this bug seems broken.

See http://bugs.horde.org/ticket/7181 page, where I've only one entry 
in the history log containing :



Fatal error: Uncaught exception 'Horde_Mime_Exception' with message 
'Validation failed for: ryan @ localhost' in 
/var/www/dev.horde.org/horde-git/framework/Mime/lib/Horde/Mime/Address.php:390 
Stack trace: #0 /var/www/dev.horde.org/horde/whups/lib/Whups.php(564)
Horde_Mime_Address::parseAddressList('ryan @ localhos...') #1 
/var/www/dev.horde.org/horde/whups/lib/Whups.php(617)
Whups->getUserAttributes('-53112_transact...') #2 
/var/www/dev.horde.org/horde/whups/lib/Renderer/Comment.php(180)
Whups->formatUser('-53112_transact...', false, true, true) #3 
/var/www/dev.horde.org/horde/whups/ticket/index.php(48)
Horde_Form_Renderer_Comment->render(53112, Object(Variables)) #4 
{main} thrown in 
/var/www/dev.horde.org/horde-git/framework/Mime/lib/Horde/Mime/Address.php on 
line 390



Regards
03/16/2009 01:41:58 PM Michael Slusarz Comment #21
State ⇒ Resolved
Reply to this comment
Is there
anything else I can do to help debug?
Other than tracking down the exact cause of the error (useful advice, 
I know), no.  As mentioned, this code has already been removed (well, 
rewritten at least and moved to the Imap client library) in IMP 
5/Horde 4 so the underlying issue has already been addressed in the 
dev code.
03/16/2009 09:30:05 AM ryan (at) localhost Comment #20 Reply to this comment
That change definitely fixed it. imp no longer crashes. I have yet to 
confirm whether this will make the caching system work, but there are 
no error messages and the message list is coming up. Is there anything 
else I can do to help debug?
03/10/2009 05:48:41 AM Michael Slusarz Comment #19
Assigned to Michael Slusarz
State ⇒ Feedback
Priority ⇒ 1. Low
Reply to this comment
Doesn't help me out much - still don't know why the data is null 
(stored data value) vs. false (indicating that the cache value doesn't 
exist).  Not worth tracking down since all of this caching code has 
been removed in IMP 5.  Try the fix contained in the last comment and 
let me know how that works.
03/10/2009 05:46:41 AM CVS Commit Comment #18 Reply to this comment
03/09/2009 03:45:40 AM ryan (at) localhost Comment #17 Reply to this comment
I have no idea if any of the below is useful, but I repeated the 
output using var_dump($ptr) as Michael had suggested later in a 
follow-up post. I got 16MB of text output that I pruned extensively. 
I've looked through my apache_log and error_log and can't find any 
errors. There are no errors reported to syslog as far as I can tell 
either. This occurs when trying to enable memcache with caching the 
message list in imp.



object(PEAR_Error)#23 (8) {

   ["error_message_prefix"]=>

   string(0) ""

   ["mode"]=>

   int(1)

   ["level"]=>

   int(1024)

   ["code"]=>

   NULL

   ["message"]=>

   string(23) "Unserialization failed."

   ["userinfo"]=>

   NULL

   ["backtrace"]=>

   array(9) {

     [0]=>

     array(6) {

       ["file"]=>

       string(23) "/usr/share/php/PEAR.php"

       ["line"]=>

       int(572)

       ["function"]=>

       string(10) "PEAR_Error"

       ["class"]=>

       string(10) "PEAR_Error"

       ["type"]=>

       string(2) "->"

       ["args"]=>

       array(5) {

         [0]=>

         string(23) "Unserialization failed."

         [1]=>

         NULL

         [2]=>

         int(1)

         [3]=>

         int(1024)

         [4]=>

         NULL

       }

     }

     [1]=>

     array(7) {

       ["file"]=>

       string(55) "/var/www/localhost/htdocs/horde/lib/Horde/Serialize.php"

       ["line"]=>

       int(378)

       ["function"]=>

       string(10) "raiseError"

       ["class"]=>

       string(4) "PEAR"

       ["object"]=>

       object(IMP_IMAP_Cache)#22 (5) {

         ["_statuscache"]=>

         array(0) {

         }

         ["_arrival"]=>

         array(0) {

         }

         ["_tosave"]=>

         bool(false)

         ["_usecache"]=>

         bool(true)

         ["_cache"]=>

         &array(2) {

           ["{localhost:143/imap/notls}INBOX.box1"]=>

           array(2) {

             ["k"]=>

             string(24) "4830|7722|1154856791|1|1"

             ["d"]=>

             array(2) {

               ["msgl"]=>

               array(2) {

                 ["hd"]=>

                 bool(true)

                 ["d"]=>

                 array(2) {

                   ["m"]=>

                   array(0) {

                   }

                   ["s"]=>

                   array(4830) {

                     [0]=>

                (and so on for the next 4000+ entries)

                     [4828]=>

                     int(2)

                     [4829]=>

                     int(1)

                   }

                 }

               }

               ["arrival"]=>

               array(2) {

                 ["hd"]=>

                 bool(true)

                 ["d"]=>

                 array(4830) {

                   [1]=>

                   int(0)

                (another 4000+ entries)

                   int(4827)

                   [7720]=>

                   int(4828)

                   [7721]=>

                   int(4829)

                 }

               }

             }

           }

           ["{localhost:143/imap/notls}INBOX.box2"]=>

           &object(PEAR_Error)#23 (8) {

             ["error_message_prefix"]=>

             string(0) ""

             ["mode"]=>

             int(1)

             ["level"]=>

             int(1024)

             ["code"]=>

             NULL

             ["message"]=>

             string(23) "Unserialization failed."

             ["userinfo"]=>

             NULL

             ["backtrace"]=>

             array(9) {

               [0]=>

               array(6) {

                 ["file"]=>

                 string(23) "/usr/share/php/PEAR.php"

                 ["line"]=>

                 int(572)

                 ["function"]=>

                 string(10) "PEAR_Error"

                 ["class"]=>

                 string(10) "PEAR_Error"

                 ["type"]=>

                 string(2) "->"

                 ["args"]=>

                 array(5) {

                   [0]=>

                   string(23) "Unserialization failed."

                   [1]=>

                   NULL

                   [2]=>

                   int(1)

                   [3]=>

                   int(1024)

                   [4]=>

                   NULL

                 }

               }

               [1]=>

               array(7) {

                 ["file"]=>

                 string(55) 
"/var/www/localhost/htdocs/horde/lib/Horde/Serialize.php"

                 ["line"]=>

                 int(378)

                 ["function"]=>

                 string(10) "raiseError"

                 ["class"]=>

                 string(4) "PEAR"

                 ["object"]=>

                 object(IMP_IMAP_Cache)#22 (5) {

                   ["_statuscache"]=>

                   array(0) {

                   }

                   ["_arrival"]=>

                   array(0) {

                   }

                   ["_tosave"]=>

                   bool(false)

                   ["_usecache"]=>

                   bool(true)

                   ["_cache"]=>

                   &array(2) {

                     ["{localhost:143/imap/notls}INBOX.box1"]=>

                     array(2) {

                       ["k"]=>

                       string(24) "4830|7722|1154856791|1|1"

                       ["d"]=>

                       array(2) {

                         ["msgl"]=>

                         array(2) {

                           ["hd"]=>

                           bool(true)

                           ["d"]=>

                           array(2) {

                             ["m"]=>

                             array(0) {

                             }

                             ["s"]=>

                             array(4830) {

                               [0]=>

                               int(7721)

                               [1]=>

                               int(7720)

                               [2]=>

                               int(7719)

                                (4000+ entries again)

                               int(5)

                               [4826]=>

                               int(4)

                               [4827]=>

                               int(3)

                               [4828]=>

                               int(2)

                               [4829]=>

                               int(1)

                             }

                           }

                         }

                         ["arrival"]=>

                         array(2) {

                           ["hd"]=>

                           bool(true)

                           ["d"]=>

                           array(4830) {

                             [1]=>

                             int(0)

                             [2]=>

                                (wheee more!)

                             int(4827)

                             [7720]=>

                             int(4828)

                             [7721]=>

                             int(4829)

                           }

                         }

                       }

                     }

                     ["{localhost:143/imap/notls}INBOX.box2"]=>

                     *RECURSION*

                   }

                 }

                 ["type"]=>

                 string(2) "->"

                 ["args"]=>

                 array(1) {

                   [0]=>

                   string(23) "Unserialization failed."

                 }

               }

               [2]=>

               array(7) {

                 ["file"]=>

                 string(55) 
"/var/www/localhost/htdocs/horde/lib/Horde/Serialize.php"

                 ["line"]=>

                 int(111)

                 ["function"]=>

                 string(12) "_unserialize"

                 ["class"]=>

                 string(15) "Horde_Serialize"

                 ["object"]=>

                 object(IMP_IMAP_Cache)#22 (5) {

                   ["_statuscache"]=>

                   array(0) {

                   }

                   ["_arrival"]=>

                   array(0) {

                   }

                   ["_tosave"]=>

                   bool(false)

                   ["_usecache"]=>

                   bool(true)

                   ["_cache"]=>

                   &array(2) {

                     ["{localhost:143/imap/notls}INBOX.box1"]=>

                     array(2) {

                       ["k"]=>

                       string(24) "4830|7722|1154856791|1|1"

                       ["d"]=>

                       array(2) {

                         ["msgl"]=>

                         array(2) {

                           ["hd"]=>

                           bool(true)

                           ["d"]=>

                           array(2) {

                             ["m"]=>

                             array(0) {

                             }

                             ["s"]=>

                             array(4830) {

                               [0]=>

                               int(7721)

                               [1]=>

                               int(7720)

                               [2]=>

                                        (removed)

                               int(3)

                               [4828]=>

                               int(2)

                               [4829]=>

                               int(1)

                             }

                           }

                         }

                         ["arrival"]=>

                         array(2) {

                           ["hd"]=>

                           bool(true)

                           ["d"]=>

                           array(4830) {

                             [1]=>

                             int(0)

                             [2]=>

                                        (removed)

                             [7719]=>

                             int(4827)

                             [7720]=>

                             int(4828)

                             [7721]=>

                             int(4829)

                           }

                         }

                       }

                     }

                     ["{localhost:143/imap/notls}INBOX.box2"]=>

                     *RECURSION*

                   }

                 }

                 ["type"]=>

                 string(2) "->"

                 ["args"]=>

                 array(3) {

                   [0]=>

                   *RECURSION*

                   [1]=>

                   int(6)

                   [2]=>

                   NULL

                 }

               }

               [3]=>

               array(7) {

                 ["file"]=>

                 string(54) 
"/var/www/localhost/htdocs/horde/imp/lib/IMAP/Cache.php"

                 ["line"]=>

                 int(105)

                 ["function"]=>

                 string(11) "unserialize"

                 ["class"]=>

                 string(15) "Horde_Serialize"

                 ["object"]=>

                 object(IMP_IMAP_Cache)#22 (5) {

                   ["_statuscache"]=>

                   array(0) {

                   }

                   ["_arrival"]=>

                   array(0) {

                   }

                   ["_tosave"]=>

                   bool(false)

                   ["_usecache"]=>

                   bool(true)

                   ["_cache"]=>

                   &array(2) {

                     ["{localhost:143/imap/notls}INBOX.box1"]=>

                     array(2) {

                       ["k"]=>

                       string(24) "4830|7722|1154856791|1|1"

                       ["d"]=>

                       array(2) {

                         ["msgl"]=>

                         array(2) {

                           ["hd"]=>

                           bool(true)

                           ["d"]=>

                           array(2) {

                             ["m"]=>

                             array(0) {

                             }

                             ["s"]=>

                             array(4830) {

                               [0]=>

                               int(7721)

                               [1]=>

                               int(7720)

                                        (removed)

                               int(6)

                               [4825]=>

                               int(5)

                               [4826]=>

                               int(4)

                               [4827]=>

                               int(3)

                               [4828]=>

                               int(2)

                               [4829]=>

                               int(1)

                             }

                           }

                         }

                         ["arrival"]=>

                         array(2) {

                           ["hd"]=>

                           bool(true)

                           ["d"]=>

                           array(4830) {

                             [1]=>

                             int(0)

                             [2]=>

                             int(1)

                             [3]=>

                                (removed)

                             int(4822)

                             [7715]=>

                             int(4823)

                             [7716]=>

                             int(4824)

                             [7717]=>

                             int(4825)

                             [7718]=>

                             int(4826)

                             [7719]=>

                             int(4827)

                             [7720]=>

                             int(4828)

                             [7721]=>

                             int(4829)

                           }

                         }

                       }

                     }

                     ["{localhost:143/imap/notls}INBOX.box2"]=>

                     *RECURSION*

                   }

                 }

                 ["type"]=>

                 string(2) "->"

                 ["args"]=>

                 array(2) {

                   [0]=>

                   NULL

                   [1]=>

                   int(6)

                 }

               }

               [4]=>

               array(7) {

                 ["file"]=>

                 string(51) 
"/var/www/localhost/htdocs/horde/imp/lib/Mailbox.php"

                 ["line"]=>

                 int(861)

                 ["function"]=>

                 string(8) "getCache"

                 ["class"]=>

                 string(14) "IMP_IMAP_Cache"

                 ["object"]=>

                 object(IMP_IMAP_Cache)#22 (5) {

                   ["_statuscache"]=>

                   array(0) {

                   }

                   ["_arrival"]=>

                   array(0) {

                   }

                   ["_tosave"]=>

                   bool(false)

                   ["_usecache"]=>

                   bool(true)

                   ["_cache"]=>

                   &array(2) {

                     ["{localhost:143/imap/notls}INBOX.box1"]=>

                     array(2) {

                       ["k"]=>

                       string(24) "4830|7722|1154856791|1|1"

                       ["d"]=>

                       array(2) {

                         ["msgl"]=>

                         array(2) {

                           ["hd"]=>

                           bool(true)

                           ["d"]=>

                           array(2) {

                             ["m"]=>

                             array(0) {

                             }

                             ["s"]=>

                             array(4830) {

                               [0]=>

                               int(7721)

                               [1]=>

                               int(7720)

                               [2]=>

                               int(7719)

                               [3]=>

                               int(7718)

                     [4236]=>

                     int(1104)

                     [4237]=>

                     int(1103)

                     [4238]=>

                     int(1099)

                     [4239]=>

                (300000+ lines removed, all the same kinda stuff)

                   [6259]=>

                   int(3940)

                   [6260]=>

                   int(3941)

                   [6261]=>

                   int(3942)

                   [6262]=>



                             [7721]=>

                             int(4829)

                           }

                         }

                       }

                     }

                     ["{localhost:143/imap/notls}INBOX.box2"]=>

                     *RECURSION*

                   }

                 }

                 ["type"]=>

                 string(2) "->"

                 ["args"]=>

                 array(4) {

                   [0]=>

                   &NULL

                   [1]=>

                   &string(35) "{localhost:143/imap/notls}INBOX.box2"

                   [2]=>

                   &string(4) "msgl"

                   [3]=>

                   &int(0)

                 }

               }

               [5]=>

               array(7) {

                 ["file"]=>

                 string(51) 
"/var/www/localhost/htdocs/horde/imp/lib/Mailbox.php"

                 ["line"]=>

                 int(621)

                 ["function"]=>

                 string(9) "_getCache"

                 ["class"]=>

                 string(11) "IMP_Mailbox"

                 ["object"]=>

                 object(IMP_Mailbox)#21 (8) {

                   ["_mailbox"]=>

                   string(9) "INBOX.box2"

                   ["_arrayIndex"]=>

                   NULL

                   ["_lastArrayIndex"]=>

                   NULL

                   ["_build"]=>

                   bool(false)

                   ["_sorted"]=>

                   array(0) {

                   }

                   ["_sortedInfo"]=>

                   array(0) {

                   }

                   ["_cacheexpire"]=>

                   bool(false)

                   ["_searchmbox"]=>

                   bool(false)

                 }

                 ["type"]=>

                 string(2) "->"

                 ["args"]=>

                 array(3) {

                   [0]=>

                   &string(9) "INBOX.box2"

                   [1]=>

                   &string(4) "msgl"

                   [2]=>

                   &int(0)

                 }

               }

               [6]=>

               array(7) {

                 ["file"]=>

                 string(51) 
"/var/www/localhost/htdocs/horde/imp/lib/Mailbox.php"

                 ["line"]=>

                 int(127)

                 ["function"]=>

                 string(10) "_setSorted"

                 ["class"]=>

                 string(11) "IMP_Mailbox"

                 ["object"]=>

                 object(IMP_Mailbox)#21 (8) {

                   ["_mailbox"]=>

                   string(9) "INBOX.box2"

                   ["_arrayIndex"]=>

                   NULL

                   ["_lastArrayIndex"]=>

                   NULL

                   ["_build"]=>

                   bool(false)

                   ["_sorted"]=>

                   array(0) {

                   }

                   ["_sortedInfo"]=>

                   array(0) {

                   }

                   ["_cacheexpire"]=>

                   bool(false)

                   ["_searchmbox"]=>

                   bool(false)

                 }

                 ["type"]=>

                 string(2) "->"

                 ["args"]=>

                 array(1) {

                   [0]=>

                   &int(1)

                 }

               }

               [7]=>

               array(7) {

                 ["file"]=>

                 string(51) 
"/var/www/localhost/htdocs/horde/imp/lib/Mailbox.php"

                 ["line"]=>

                 int(105)

                 ["function"]=>

                 string(11) "IMP_Mailbox"

                 ["class"]=>

                 string(11) "IMP_Mailbox"

                 ["object"]=>

                 object(IMP_Mailbox)#21 (8) {

                   ["_mailbox"]=>

                   string(9) "INBOX.box2"

                   ["_arrayIndex"]=>

                   NULL

                   ["_lastArrayIndex"]=>

                   NULL

                   ["_build"]=>

                   bool(false)

                   ["_sorted"]=>

                   array(0) {

                   }

                   ["_sortedInfo"]=>

                   array(0) {

                   }

                   ["_cacheexpire"]=>

                   bool(false)

                   ["_searchmbox"]=>

                   bool(false)

                 }

                 ["type"]=>

                 string(2) "->"

                 ["args"]=>

                 array(2) {

                   [0]=>

                   &string(9) "INBOX.box2"

                   [1]=>

                   &NULL

                 }

               }

               [8]=>

               array(6) {

                 ["file"]=>

                 string(47) "/var/www/localhost/htdocs/horde/imp/mailbox.php"

                 ["line"]=>

                 int(229)

                 ["function"]=>

                 string(9) "singleton"

                 ["class"]=>

                 string(11) "IMP_Mailbox"

                 ["type"]=>

                 string(2) "::"

                 ["args"]=>

                 array(1) {

                   [0]=>

                   &string(9) "INBOX.box2"

                 }

               }

             }

             ["callback"]=>

             NULL

           }

         }

       }

       ["type"]=>

       string(2) "->"

       ["args"]=>

       array(4) {

         [0]=>

         &NULL

         [1]=>

         &string(35) "{localhost:143/imap/notls}INBOX.box2"

         [2]=>

         &string(4) "msgl"

         [3]=>

         &int(0)

       }

     }

     [5]=>

     array(7) {

       ["file"]=>

       string(51) "/var/www/localhost/htdocs/horde/imp/lib/Mailbox.php"

       ["line"]=>

       int(621)

       ["function"]=>

       string(9) "_getCache"

       ["class"]=>

       string(11) "IMP_Mailbox"

       ["object"]=>

       object(IMP_Mailbox)#21 (8) {

         ["_mailbox"]=>

         string(9) "INBOX.box2"

         ["_arrayIndex"]=>

         NULL

         ["_lastArrayIndex"]=>

         NULL

         ["_build"]=>

         bool(false)

         ["_sorted"]=>

         array(0) {

         }

         ["_sortedInfo"]=>

         array(0) {

         }

         ["_cacheexpire"]=>

         bool(false)

         ["_searchmbox"]=>

         bool(false)

       }

       ["type"]=>

       string(2) "->"

       ["args"]=>

       array(3) {

         [0]=>

         &string(9) "INBOX.box2"

         [1]=>

         &string(4) "msgl"

         [2]=>

         &int(0)

       }

     }

     [6]=>

     array(7) {

       ["file"]=>

       string(51) "/var/www/localhost/htdocs/horde/imp/lib/Mailbox.php"

       ["line"]=>

       int(127)

       ["function"]=>

       string(10) "_setSorted"

       ["class"]=>

       string(11) "IMP_Mailbox"

       ["object"]=>

       object(IMP_Mailbox)#21 (8) {

         ["_mailbox"]=>

         string(9) "INBOX.box2"

         ["_arrayIndex"]=>

         NULL

         ["_lastArrayIndex"]=>

         NULL

         ["_build"]=>

         bool(false)

         ["_sorted"]=>

         array(0) {

         }

         ["_sortedInfo"]=>

         array(0) {

         }

         ["_cacheexpire"]=>

         bool(false)

         ["_searchmbox"]=>

         bool(false)

       }

       ["type"]=>

       string(2) "->"

       ["args"]=>

       array(1) {

         [0]=>

         &int(1)

       }

     }

     [7]=>

     array(7) {

       ["file"]=>

       string(51) "/var/www/localhost/htdocs/horde/imp/lib/Mailbox.php"

       ["line"]=>

       int(105)

       ["function"]=>

       string(11) "IMP_Mailbox"

       ["class"]=>

       string(11) "IMP_Mailbox"

       ["object"]=>

       object(IMP_Mailbox)#21 (8) {

         ["_mailbox"]=>

         string(9) "INBOX.box2"

         ["_arrayIndex"]=>

         NULL

         ["_lastArrayIndex"]=>

         NULL

         ["_build"]=>

         bool(false)

         ["_sorted"]=>

         array(0) {

         }

         ["_sortedInfo"]=>

         array(0) {

         }

         ["_cacheexpire"]=>

         bool(false)

         ["_searchmbox"]=>

         bool(false)

       }

       ["type"]=>

       string(2) "->"

       ["args"]=>

       array(2) {

         [0]=>

         &string(9) "INBOX.box2"

         [1]=>

         &NULL

       }

     }

     [8]=>

     array(6) {

       ["file"]=>

       string(47) "/var/www/localhost/htdocs/horde/imp/mailbox.php"

       ["line"]=>

       int(229)

       ["function"]=>

       string(9) "singleton"

       ["class"]=>

       string(11) "IMP_Mailbox"

       ["type"]=>

       string(2) "::"

       ["args"]=>

       array(1) {

         [0]=>

         &string(9) "INBOX.box2"

       }

     }

   }

   ["callback"]=>

   NULL

}

<br />

<b>Fatal error</b>:  Cannot use object of type PEAR_Error as array in 
<b>/var/www/localhost/htdocs/horde/lib/Horde/IMAP/Cache.php</b> on 
line <b>83</b><br />


03/08/2009 04:20:56 AM ryan (at) localhost Comment #16 Reply to this comment
I am having this same problem with horde 3.3. It crashes with the same 
error whenever I enable memory caching. I want to help with the debug, 
but I don't understand the instructions that Michael wrote on 
08/20/2008. In my Cache.php file, there is no 
Horde_Serialize::unserialize() line. There is also no $res variable as 
far as I can tell. In the getCache function, if I put in the 
print_r($ptr) line just after the $ptr variable is declared on line 
78, then I get the same output that the original poster made. I'd be 
happy to provide more information or run a debug somewhere else, but I 
need more detailed instructions.
03/01/2009 11:31:59 AM Jan Schneider Comment #15 Reply to this comment
As long as nobody provides the information requested by Michael, the 
developer won't take any further look into this.
02/28/2009 02:32:45 PM Duck Comment #14 Reply to this comment
I have the same problem with memcaced pecl extensiom 3.x. I disabled 
cache in imp configuration and servers and  it works.
02/27/2009 04:51:24 PM gimili17 (at) gmail (dot) com Comment #13 Reply to this comment
I have the same problem after I did the upgrade from Debian Etch to 
Debian Lenny.  Does anyone have eAccelerator 0.9.5.3 working on Lenny 
with horde?  I only get the error when I go into imp.  Thanks!
10/07/2008 02:26:53 PM Jan Schneider State ⇒ No Feedback
 
09/05/2008 05:55:21 PM Michael Slusarz Comment #12 Reply to this comment
That print_r() has to return *something* or else there is no possible 
way the code could reach that point (the code would short-circuit that 
section if the variable was truly empty).  You can try replacing 
print_r() with var_dump() and see if that helps.



And if PHP is crashing, an error message has to be output *somewhere* 
(unless you have somehow configured your webserver to redirect all 
standard output/error from PHP to /dev/null, which is a Bad Idea).
09/03/2008 07:57:23 PM mike (at) soroki (dot) com Comment #11 Reply to this comment
Hi, I am also hitting this bug when enabling cache driver
"eaccelerator" in horde/conf.php
According to your e-mail on the mailing list, this is *not* the same
issue.  Your eaccelerator is broken.  This ticket describes an error
dealing with the content of the cached data.
That's correct.  Based on the posting you referred me, I recompiled 
the eaccelerator-0.9.5.3 with the settings below.  That alleviated one 
problem with eaccelerator_get() function and brought me this bug that 
we are discussing here.



'./configure' \

'--with-eaccelerator-shared-memory' \

'--with-php-config=/usr/local/bin/php-config' \

'--with-eaccelerator-content-caching' \


09/03/2008 06:38:14 PM Michael Slusarz Comment #10 Reply to this comment
Hi, I am also hitting this bug when enabling cache driver
"eaccelerator" in horde/conf.php
According to your e-mail on the mailing list, this is *not* the same 
issue.  Your eaccelerator is broken.  This ticket describes an error 
dealing with the content of the cached data.
09/03/2008 06:35:08 PM mike (at) soroki (dot) com Comment #9 Reply to this comment
Including the print statement suggested didn't help:
Of course it doesn't. It is not supposed to fix the problem, but to
output information that helps us localizing it. So, what output does
it generate?
Sorry, you're right.  I basically get a blank screen on the main page 
and no additional messages or errors other then the one regarding PEAR 
object.
09/03/2008 04:37:00 PM Jan Schneider Comment #8 Reply to this comment
Including the print statement suggested didn't help:
Of course it doesn't. It is not supposed to fix the problem, but to 
output information that helps us localizing it. So, what output does 
it generate?
09/03/2008 03:30:00 PM mike (at) soroki (dot) com Comment #7 Reply to this comment

[Show Quoted Text - 15 lines]
Hi, I am also hitting this bug when enabling cache driver 
"eaccelerator" in horde/conf.php



Including the print statement suggested didn't help:



horde/imp/lib/IMAP/Cache.php



  function getCache($imap, $mailbox, $key = null, $check = true)

     {

         $imp_imap = &IMP_IMAP::singleton();

         $res = parent::getCache($imp_imap->stream(), $mailbox, $key, $check);

         if ($this->_usecache &&

             ($res === false) &&

             !isset($this->_cache[$mailbox])) {

             require_once 'Horde/Cache.php';

             $cache = 
&Horde_Cache::singleton($GLOBALS['conf']['cache']['driver'], 
Horde::getDriverConfig('cache', $GLOBALS['conf']['cache']['driver']));

             $res = $cache->get($this->_getHordeCacheID($mailbox), 
$GLOBALS['conf']['mlistcache']['lifetime']);

             if ($res === false) {

                 $this->_cache[$mailbox] = array('d' => array(), 'k' => null);

             } else {

                 require_once 'Horde/Serialize.php';

                 print_r($res);

                 $this->_cache[$mailbox] = 
Horde_Serialize::unserialize($res, SERIALIZE_BASIC);

                 $res = parent::getCache($imp_imap->stream(), 
$mailbox, $key, $check);

                 Horde::logMessage('Retrieved ' . $mailbox . ' from 
cache.', __FILE__, __LINE__, PEAR_LOG_DEBUG);

             }

         }

         return $res;

     }


08/29/2008 01:42:03 PM Jan Schneider Comment #6 Reply to this comment
Ping?
08/20/2008 06:57:16 PM Michael Slusarz Comment #5 Reply to this comment

[Show Quoted Text - 10 lines]
In getCache() located in imp/lib/IMAP/Cache.php, please put a 
print_r($res) right before the Horde_Serialize::unserialize() line.   
The critical information is what data is serialized in the cache.
08/11/2008 06:38:14 PM x5pcjr3t1nvsqf0 (at) bodhi (dot) lawlita (dot) com Comment #4 Reply to this comment
What do you do to get this to happen? What are the actual versions involved?
Debian Lenny

aptitude install horde3

Version: Horde (horde)  3.2.1



I activate caching in the administration -> configuration -> Webmail 
(imp)  H3 (4.2) -> Mailbox and Fetchmail -> Mailbox List Caching



Every time i click on webmail the error below appear.
08/11/2008 05:22:36 AM Michael Slusarz Comment #3 Reply to this comment
What do you do to get this to happen? What are the actual versions involved?
According to the PEAR_Error output, looks like the cached value is 
empty.  We could change the:

$res === false

check to:

empty($res)

since if the return is empty, we know there is no serialized data 
anyway.  But it also would be good to know why we are setting the 
cache value to empty (assuming it is the code that is causing this and 
not a bad installation, etc.)
08/10/2008 03:54:58 PM Chuck Hagenbuch Comment #2
State ⇒ Feedback
Reply to this comment
What do you do to get this to happen? What are the actual versions involved?
08/10/2008 10:16:41 AM x5pcjr3t1nvsqf0 (at) bodhi (dot) lawlita (dot) com Comment #1
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Due ⇒ 08/10/2008
Summary ⇒ Fatal error: Cannot use object of type PEAR_Error as array in /usr/share/horde3/lib/Horde/IMAP/Cache.php on line 80
Type ⇒ Bug
Queue ⇒ Horde Framework Packages
Reply to this comment
print_r($ptr);



PEAR_Error Object

(

     [error_message_prefix] =>

     [mode] => 1

     [level] => 1024

     [code] =>

     [message] => Unserialization failed.

     [userinfo] =>

     [backtrace] => Array

         (

             [0] => Array

                 (

                     [file] => /usr/share/php/PEAR.php

                     [line] => 576

                     [function] => PEAR_Error

                     [class] => PEAR_Error

                     [type] => ->

                     [args] => Array

                         (

                             [0] => Unserialization failed.

                             [1] =>

                             [2] => 1

                             [3] => 1024

                             [4] =>

                         )



                 )



             [1] => Array

                 (

                     [file] => /usr/share/horde3/lib/Horde/Serialize.php

                     [line] => 378

                     [function] => raiseError

                     [class] => PEAR

                     [object] => __PHP_Incomplete_Class Object

                         (

                             [__PHP_Incomplete_Class_Name] => IMP_IMAP_Cache

                             [_statuscache] => Array

                                 (

                                 )



                             [_arrival] => Array

                                 (

                                 )



                             [_tosave] =>

                             [_usecache] => 1

                             [_cache] => Array

                                 (

                                     [{domain.de:143/imap/notls}INBOX] 
=> PEAR_Error Object

  *RECURSION*

                                 )



                         )



                     [type] => ->

                     [args] => Array

                         (

                             [0] => Unserialization failed.

                         )



                 )



             [2] => Array

                 (

                     [file] => /usr/share/horde3/lib/Horde/Serialize.php

                     [line] => 111

                     [function] => _unserialize

                     [class] => Horde_Serialize

                     [object] => __PHP_Incomplete_Class Object

                         (

                             [__PHP_Incomplete_Class_Name] => IMP_IMAP_Cache

                             [_statuscache] => Array

                                 (

                                 )



                             [_arrival] => Array

                                 (

                                 )



                             [_tosave] =>

                             [_usecache] => 1

                             [_cache] => Array

                                 (

                                     [{domain.de:143/imap/notls}INBOX] 
=> PEAR_Error Object

  *RECURSION*

                                 )



                         )



                     [type] => ->

                     [args] => Array

                         (

                             [0] => PEAR_Error Object

  *RECURSION*

                             [1] => 6

                             [2] =>

                         )



                 )



             [3] => Array

                 (

                     [file] => /usr/share/horde3/imp/lib/IMAP/Cache.php

                     [line] => 105

                     [function] => unserialize

                     [class] => Horde_Serialize

                     [object] => __PHP_Incomplete_Class Object

                         (

                             [__PHP_Incomplete_Class_Name] => IMP_IMAP_Cache

                             [_statuscache] => Array

                                 (

                                 )



                             [_arrival] => Array

                                 (

                                 )



                             [_tosave] =>

                             [_usecache] => 1

                             [_cache] => Array

                                 (

                                     [{domain.de:143/imap/notls}INBOX] 
=> PEAR_Error Object

  *RECURSION*

                                 )



                         )



                     [type] => ->

                     [args] => Array

                         (

                             [0] =>

                             [1] => 6

                         )



                 )



             [4] => Array

                 (

                     [file] => /usr/share/horde3/imp/lib/Mailbox.php

                     [line] => 861

                     [function] => getCache

                     [class] => IMP_IMAP_Cache

                     [object] => __PHP_Incomplete_Class Object

                         (

                             [__PHP_Incomplete_Class_Name] => IMP_IMAP_Cache

                             [_statuscache] => Array

                                 (

                                 )



                             [_arrival] => Array

                                 (

                                 )



                             [_tosave] =>

                             [_usecache] => 1

                             [_cache] => Array

                                 (

                                     [{domain.de:143/imap/notls}INBOX] 
=> PEAR_Error Object

  *RECURSION*

                                 )



                         )



                     [type] => ->

                     [args] => Array

                         (

                             [0] =>

                             [1] => {domain.de:143/imap/notls}INBOX

                             [2] => msgl

                             [3] => 0

                         )



                 )



             [5] => Array

                 (

                     [file] => /usr/share/horde3/imp/lib/Mailbox.php

                     [line] => 621

                     [function] => _getCache

                     [class] => IMP_Mailbox

                     [object] => __PHP_Incomplete_Class Object

                         (

                             [__PHP_Incomplete_Class_Name] => IMP_Mailbox

                             [_mailbox] => INBOX

                             [_arrayIndex] =>

                             [_lastArrayIndex] =>

                             [_build] =>

                             [_sorted] => Array

                                 (

                                 )



                             [_sortedInfo] => Array

                                 (

                                 )



                             [_cacheexpire] =>

                             [_searchmbox] =>

                         )



                     [type] => ->

                     [args] => Array

                         (

                             [0] => INBOX

                             [1] => msgl

                             [2] => 0

                         )



                 )



             [6] => Array

                 (

                     [file] => /usr/share/horde3/imp/lib/Mailbox.php

                     [line] => 127

                     [function] => _setSorted

                     [class] => IMP_Mailbox

                     [object] => __PHP_Incomplete_Class Object

                         (

                             [__PHP_Incomplete_Class_Name] => IMP_Mailbox

                             [_mailbox] => INBOX

                             [_arrayIndex] =>

                             [_lastArrayIndex] =>

                             [_build] =>

                             [_sorted] => Array

                                 (

                                 )



                             [_sortedInfo] => Array

                                 (

                                 )



                             [_cacheexpire] =>

                             [_searchmbox] =>

                         )



                     [type] => ->

                     [args] => Array

                         (

                             [0] => 1

                         )



                 )



             [7] => Array

                 (

                     [file] => /usr/share/horde3/imp/lib/Mailbox.php

                     [line] => 105

                     [function] => IMP_Mailbox

                     [class] => IMP_Mailbox

                     [object] => __PHP_Incomplete_Class Object

                         (

                             [__PHP_Incomplete_Class_Name] => IMP_Mailbox

                             [_mailbox] => INBOX

                             [_arrayIndex] =>

                             [_lastArrayIndex] =>

                             [_build] =>

                             [_sorted] => Array

                                 (

                                 )



                             [_sortedInfo] => Array

                                 (

                                 )



                             [_cacheexpire] =>

                             [_searchmbox] =>

                         )



                     [type] => ->

                     [args] => Array

                         (

                             [0] => INBOX

                             [1] =>

                         )



                 )



             [8] => Array

                 (

                     [file] => /usr/share/horde3/imp/mailbox.php

                     [line] => 229

                     [function] => singleton

                     [class] => IMP_Mailbox

                     [type] => ::

                     [args] => Array

                         (

                             [0] => INBOX

                         )



                 )



         )



     [callback] =>

)

Saved Queries