Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.6.3

Bug #4223 mbox files gets corrupted when multiple clients modify it
Submitted: 2005-04-26 10:48 UTC
From: markus at emedia-solutions-wolf dot de Assigned: cweiske
Status: Closed Package: Mail_Mbox
PHP Version: 4.3.10 OS: Debian Linux
Roadmaps: (Not assigned)    
Subscription  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
2006-06-25 09:31 UTC
Package:
Bug Type:
Summary:
From: markus at emedia-solutions-wolf dot de
New email:
PHP Version: Package Version: OS:

 

 [2005-04-26 10:48 UTC] markus at emedia-solutions-wolf dot de
Description: ------------ If multiple clients read and modify the same mbox file, then Mail_Mbox corrupts it. This is caused because this start and end byte position change when a mail gets modified. This isn't tracked by Mail_Mbox and the next read and update will destroy the mbox file because of wrong start/end byte position... Reproduce code: --------------- Just run the test supplied in the documentation in a long running loop doing all the same all the while with the open mbox file. Then start mutt and flag a mail as new or old or whatever. The php script must not be in a loop, but imagine it is reading a mbox file at the same moment when mutt edits it. (This is allowed and recommended by the mbox format specs) Expected result: ---------------- A correct mbox file anytime. Actual result: -------------- A corrupted mbox file.

Comments

 [2005-04-26 11:01 UTC] markus at emedia-solutions-wolf dot de
Best solution would be testing if start and end byte positions are valid before reading and writing to mbox. And also request a lock on the mbox file during write operations.
 [2006-06-25 09:31 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!