[#5111] Keeps asking for maintenance
Summary Keeps asking for maintenance
Queue Horde Base
Queue Version HEAD
Type Bug
State Resolved
Priority 3. High
Owners chuck@horde.org
Requester franke@bethzur.com
Created 2007-03-13 (5338 days ago)
Due
Updated 2007-08-05 (5193 days ago)
Assigned 2007-04-18 (5302 days ago)
Resolved 2007-08-05 (5193 days ago)
Milestone
Patch No

Comments
franke@bethzur.com 2007-03-13 22:28:55
My users have been reporting, and I verified with my account, that 
every time I log in (via IMP to a SMTP server), it wants to do 
maintanance, spepcifically, "all old attachments more than 6 months 
old will be deleted." It keeps showing up no matter how many times I 
click "Perform Maintenance Operations".



Oddly, if I put some bogus code in delete_attachments_monthly.php in 
doMaintenance(), it never seems to get an error. Maybe it's not being 
called?

Chuck Hagenbuch <chuck@horde.org> 2007-03-14 03:35:02
Do you have a preferences backend set up?

franke@bethzur.com 2007-03-15 17:00:04
Yes, I have a preferences backend via MySQL. I have verified that the 
horde_prefs table exists and contains data. This problem didn't happen 
until a few weeks ago when I updated to the latest from CVS. I 
experience this problem whether or not the user has a 
delete_attachments_monthly value or not.



I also have a vfs setup via the database as well.

franke@bethzur.com 2007-03-20 18:24:32
Anything further I can check to track down this problem? How does it 
decide when it needs to pop up this question?

franke@bethzur.com 2007-03-21 00:50:25
I'm not sure why this worked, but I did this in mysql and it seems to 
have fixed it:



delete from horde_prefs where pref_name='last_maintenance';



Chuck Hagenbuch <chuck@horde.org> 2007-03-21 03:30:05
Probably a bad value had gotten into the last_maintenance pref and 
that prevented it from updating correctly. I'm not entirely sure why 
this would happen, but it makes sense that just resetting the values 
would fix it.

franke@bethzur.com 2007-04-11 14:46:12
Re bug report 5111, it's back. IMP keeps wanting to purge old 
attachments every time I log in. I checked the last_maintenance value 
for my user, and it is NOT changing when maintenance is performed. So, 
it keeps asking. Previously, I removed all values from horde_prefs 
where pref_name = last_maintenance, and that fixed it for 30 days. 
However, 30 days later, it seems to be back. Any idea why the 
last_maintenance is never updated only inserted?



A little more information. /usr/share/php/Horde/Maintenance.php, which 
is where framework/Maintenance/Maintenance.php gets installed, has a 
function _doMaintenanceTasks(). In there, it seems that 
count($this->_tasklist->getList()) is never zero. The 
delete_attachments_monthly element in the array is never removed. This 
is because if ($val['newpage']) is true (1), and it breaks out of the 
loop without removing the entry.



I have no idea what this should be doing, but that's what's happening.



If I either purge this attribute from horde_prefs or modify the source 
to always update the date (basically assume all tasks compelted), then 
it doesn't keep asking. Somehow it doesn't think the maintenance task 
completed.



This happens in every browser (IE, FF and Safari).

Jan Schneider <jan@horde.org> 2007-06-26 09:58:09
This is only happening with PHP 4.

Michael Slusarz <slusarz@horde.org> 2007-07-17 07:42:16
Does anybody have PHP 4 setup?  I also haven't touched the maintenance 
code in at least 2 years so none of this looks familiar to me.

franke@bethzur.com 2007-07-18 00:06:30
> Does anybody have PHP 4 setup?  I also haven't touched the

> maintenance code in at least 2 years so none of this looks familiar

> to me.



I'm running PHP4 on my server.

Michael Slusarz <slusarz@horde.org> 2007-07-18 00:14:17
> I'm running PHP4 on my server.



Yes - but are you willing to trace the code to determine where in the 
code it is failing in PHP 4 (vs. PHP 5)?  That was what I was asking - 
and my question was directed more towards the other devs.

mi.braun@onlinehome.de 2007-08-04 07:55:25
Hi,



I had once the same problem and it resolved for me to open IMP 
preferences and to resave them. This also fixed some odd errors where 
php complained about missing keys anywhere to me.



Maybe you want to give it a try?



Michael

Chuck Hagenbuch <chuck@horde.org> 2007-08-05 22:53:25
Like several other PHP 4-only problems, this turned out to be a 
reference issue. It's fixed now.