Summary | imp goes into an infinite loop for a couple of accounts (in Folder.php) |
Queue | IMP |
Queue Version | HEAD |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | |
Requester | seker (at) uwyo (dot) edu |
Created | 11/22/2005 (7138 days ago) |
Due | |
Updated | 11/30/2005 (7130 days ago) |
Assigned | 11/22/2005 (7138 days ago) |
Resolved | 11/30/2005 (7130 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
using no matter what :)
Closing this ticket.
not sure how two of the accounts used mh, since I don't have it
installed... but the file was there.
years ago), he still uses Rmail mail now and again.
The other two are accounts created within the last year, so they
should not have been able to used it. They use pine and imp to read
there mail.
from the other 2, but I think it is fixed for all of them.
Thanks!
http://cvs.horde.org/diff.php/imp/lib/Folder.php?r1=1.163&r2=1.164&ty=u
http://cvs.horde.org/diff.php/imp/lib/Folder.php?r1=1.162&r2=1.163&ty=u
[client ipaddr] PHP Warning: explode(): Empty delimiter. in
/var/www/html/horde/imp/lib/Folder.php on line 168, referer:
https://webmail/horde/services/portal/sidebar.php
[client ipaddr ] PHP Warning: array_pop(): The argument should be an
array in /var/www/html/horde/imp/lib/Folder.php on line 169, referer
: https://webmail/horde/services/portal/sidebar.php
Repeat starts here:
[client ipaddr] PHP Warning: implode(): Bad arguments. in
/var/www/html/horde/imp/lib/Folder.php on line 174, referer:
https://webmail/horde/services/portal/sidebar.php
[client ipaddr] PHP Warning: array_pop(): The argument should be an
array in /var/www/html/horde/imp/lib/Folder.php on line 186, referer
: https://webmail/horde/services/portal/sidebar.php
and repeat...
making sure the line number matchup, heres the code, starting at 168
through 187
168 $parts = explode($mailbox['d'], $label);
169 $subfolder = array_pop($parts);
170 $parentparts = $parts;
171 $pstack = array();
172
173 while ($i = count($parentparts)) {
174 $parent = implode($mailbox['d'], $parentparts);
175 if (!empty($parent) &&
176 !isset($seen[$parent])) {
177 $seen[$parent] = true;
178 $plabel = str_repeat(' ', 4 * ($i - 1))
. String::convertCharset($parts[($i - 1)], 'UTF7-IMAP');
179 if (strlen($plabel) > 26) {
180 $pabbrev = String::substr($plabel,
0, 10) . '...' . String::substr($plabel, -13, 13);
181 } else {
182 $pabbrev = $plabel;
183 }
184 $pstack[$parent] = array('val' => '',
'label' => $plabel, 'abbrev' => $pabbrev);
185 }
186 array_pop($parentparts);
187 }
http://cvs.horde.org/diff.php/imp/lib/Folder.php?r1=1.160&r2=1.161&ty=u
Array ( [name] => [delimiter] => / [type] => personal ) Array ( [name]
=> #mhinbox [delimiter] => [type] => personal ) Array ( [name] => #mh/
[delimiter] => / [type] => personal ) Array ( [name] => #shared/
[delimiter] => / [type] => shared ) Array ( [name] => #public/
[delimiter] => / [type] => shared )
The logs in the error log were the same.
print_r($ns_info);
on line 121 of Folder.php and post the output.
[client ipaddr ] PHP Notice: Uninitialized string offset: 0 in
/var/www/html/horde/imp/lib/Folder.php on line 168, referer:
https://webmail/horde/services/portal/sidebar.php
[client ipaddr] PHP Warning: explode(): Empty delimiter. in
/var/www/html/horde/imp/lib/Folder.php on line 168, referer:
https://webmail/horde/services/portal/sidebar.php
[client ipaddr] PHP Warning: array_pop(): The argument should be an array
in /var/www/html/horde/imp/lib/Folder.php on line 169, referer:
https://webmail/horde/services/portal/sidebar.php
REPEAT lines start here:
[client ipaddr] PHP Notice: Uninitialized string offset: 0 in
/var/www/html/horde/imp/lib/Folder.php on line 174, referer:
https://webmail/horde/services/portal/sidebar.php
[client ipaddr] PHP Warning: implode(): Bad arguments. in
/var/www/html/horde/imp/lib/Folder.php on line 174, referer:
https://webmail/horde/services/portal/sidebar.php
[client ipaddr] PHP Warning: array_pop(): The argument should be an array
in /var/www/html/horde/imp/lib/Folder.php on line 186, referer:
https://webmail/horde/services/portal/sidebar.php
AND repeat until timeout or machine crashes, which ever comes first.
[client ipaddr ] PHP Fatal error: Maximum execution time of 30
seconds exceeded in /var/www/html/horde/imp/lib/Folder.php on line
174, referer: https://webmail/horde/services/portal/sidebar.php
horde.log entry, 1 line
Nov 28 14:04:54 HORDE [notice] [imp] Login success for USER [ip addr]
to {localhost:143} [on line 152 of
"/var/www/html/horde/imp/redirect.php"]
$servers['cosc'] = array(
'name' => 'Cosc Server',
'server' => 'localhost',
'hordeauth' => false,
'protocol' => 'imap/notls',
'port' => 143,
'maildomain' => 'uwyo.edu',
'smtphost' => 'fred',
'smtpport' => 25,
'realm' => 'uwyo.edu',
'preferred' => '',
'dotfiles' => false,
);
authenication in horde is through imp.
horde passwords are the same as their imp passwords? that's still the
only thing I can think of that would cause those parameters to be
undefined.
repeating the 3 I listed, until it filled my filesystem with the logs
were kept. I didn't see any other messages, except message saying
they had logged in.
I can turn the loggin back to E_All and see if there are any more, but
since it don't happen in my account, I won't be see the messages until
after thanksgiving.
only warnings/error messages? There should be some before already.
HEAD, since if namespace and/or the delimiter was not set correctly
IMAP_Client:: would have thrown all sorts of errors on login. So the
only thing I can think is somehow IMP code is being called before the
user has ever logged into IMP, and the session variables are not yet
set.
State ⇒ Feedback
Priority ⇒ 2. Medium
only warnings/error messages? There should be some before already.
and suddenly this behaviour started. I was experimenting with custom
hooks at the time, but disabling them, deleting them and emptying the
horde_prefs has no effect.
Met this problem before too once. Sadly it then ran until it had
filled 200GiB of diskspace with error logging :)
A reboot saved it then, but not this time.
Linux, apache 2.0.55, courier 4.0.6, php 5.0.5.
Priority ⇒ 3. High
State ⇒ Unconfirmed
Queue ⇒ IMP
Summary ⇒ imp goes into an infinite loop for a couple of accounts (in Folder.php)
Type ⇒ Bug
cause Folder.php to go into an infinite loop, generating tons of log
messages from php to the error log (see below) and php never stops, the
web server has be stopped and restarted. This loop only happens in
imp, they can use horde, other modules are load up just fine. All the rest
of the people can use the system including imp without problems.
For the failing accounts, They login correctly, the horde main page
loads. When
they click on mail, then it goes into the infinite loop. It will also
happens, when the click on personal information in mail options, I
haven't had them try any of the other options in mail.
I've created a new user account and loged it into horde/imp and it
worked without problems. I deleted all the entries (I think anyway)
from the database on one of the failing accounts and had the user login
again and it still did the same thing.
message, repeated until fills up the file space for the logs :
[client ip addr] PHP Warning: implode(): Bad arguments. in
/var/www/html/horde/imp/lib/Folder.php on line 174, referer:
https://webmail/horde/services/portal/sidebar.php
[client ip addr] PHP Warning: array_pop(): The argument should be an
array in /var/www/html/horde/imp/lib/Folder.php on line 186, referer:
https://webmail/horde/services/portal/sidebar.php
[client ip addr] PHP Notice: Uninitialized string offset: 0 in
/var/www/html/horde/imp/lib/Folder.php on line 174, referer:
https://webmail/horde/services/portal/sidebar.php
The lines listed by the errors are:
173: while ($i = count($parentparts)) {
174: $parent = implode($mailbox['d']['delimiter'], $parentparts);
186: array_pop($parentparts);
So my guess is that the $parentparts array doesn't have correct values
and the while loop doesn't end when parentparts is empty, but it's not
empty due to the error at 174 and/or 186.
As a stop gap, I changed to horde configs: max_execution_time to 30
and error_reporting to E_ERROR, so everyone else can use the system.
configs info:
Redhat E4, php-4.3.9-3.9, mysql-4.1.12-3.RHEL4.1
cvs head (today 11/22/05), using mysql drivers, no mailbox caching
Horde: 3.2-cvs Imp: H3 (4.2-cvs) Ingo: H3 (1.2-cvs) Jeta: 0.1-cvs
Kronolith: H3 (2.2-cvs) Mnemo: H3 (2.2-cvs) Nag: H3 (2.2-cvs) Turba: H3
(2.2-cvs)