[Tickets #7181] Re: Fatal error: Cannot use object of type PEAR_Error as array in /usr/share/horde3/lib/Horde/IMAP/Cache.php on line 80

bugs at horde.org bugs at horde.org
Mon Mar 9 03:45:42 UTC 2009


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/7181
------------------------------------------------------------------------------
  Ticket             | 7181
  Updated By         | ryan at localhost
  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
  Version            | FRAMEWORK_3
  Type               | Bug
  State              | No Feedback
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


ryan at localhost (2009-03-08 23:45) wrote:

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 />







More information about the bugs mailing list