From: Ruben at e-builds dot com
Operating system: Win XP // IIS 5.1
PHP version: 5.1.4
PHP Bug Type: IMAP related
Bug description: imap_mail_move results in 'Notice' and script execution
stopped
Description:
------------
Only sometimes, but once I get it, most of the next times, when I call
imap_mail_move within a loop over the mails in an imap folder it returns 0
though it shouldn't!
In the next iteration of the loop I get the Notice:
Notice: Unknown: No matching messages (errflg=2) in Unknown on line 0
probably at the next imap function (imap_headerinfo).
I also think, though it is a Notice, it manages to not completely let my
loop finish all the remaining iterations.
Reproduce code:
---------------
..
$cmails=imap_num_msg($imap);
for ($i = 1; $i <= $cmails; $i++) {
set_time_limit(120) ;
$header = imap_headerinfo($imap, $i);
..
imap_mail_move($imap, $i, 'OLT Incomplete');
..
}
Expected result:
----------------
for all messages to be moved to 'OLT Invomplete'
(with some conditions of course, but for simplicity not mentioned)
Actual result:
--------------
-----------------START-----------------
Connected to mailserver
Found 4 messages. Reading unread..
Reading unread e-mail (nr. 1)..
IS a license request.
Request has all the MINIMUM information. Putting into OLT..
Checking USER
User found by e-mail!
User ID=16691
User (ID:16691) doubted and updated as such!
E-mail sent to user to activate account.
Checking LICENSE
Using License Number: 0330100000118
License created in DB! (ID:34458)
License key on Hold.
Request successfully added in OLT! (Moved to imap folder 'Completed')
Reading unread e-mail (nr. 2)..
IS a license request.
Request has all the MINIMUM information. Putting into OLT..
Checking USER
User not found.
User (ID:16691) doubted and updated as such!
E-mail sent to user to activate account.
Checking LICENSE
Country is unknown (no invoice would be made (Could not move to
imap folder 'Incomplete')
------------------END------------------
Notice: Unknown: No matching messages (errflg=2) in Unknown on line 0
--
Edit bug report at http://bugs.php.net/?id=38188&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=38188&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=38188&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=38188&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38188&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=38188&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=38188&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=38188&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=38188&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=38188&r=support
Expected behavior: http://bugs.php.net/fix.php?id=38188&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=38188&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=38188&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38188&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38188&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38188&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=38188&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=38188&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=38188&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=38188&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=38188&r=mysqlcfg