From: xtof at xtof dot com Operating system: CentOS 5 PHP version: 5.2.5 PHP Bug Type: IMAP related Bug description: imap_savebody writes invalid base64
Description: ------------ imap_savebody does not work correctly (invalid base64 written). - using imap 2007 c-client - I've also found that using imap_fetchbody on the same message part before the save will fix this bug! ex : $fp = fopen('tmp/test.fetched','w'); fwrite($fp,imap_fetchbody($mbox,$id,2); fclose($fp); imap_savebody($mbox,'tmp/test.saved',$id,2); > >-rw-r--r-- 1 iol iol 131714 Dec 24 20:07 test.fetched >-rw-r--r-- 1 iol iol 131714 Dec 24 20:07 test.saved but : imap_savebody($mbox,'tmp/test.saved',$id,2); // alone > >-rw-r--r-- 1 iol iol 131650 Dec 24 20:10 test.saved a diff will show differences : [EMAIL PROTECTED] tmp]$ diff test.saved test.fetched 133c133 < nbgqw4qlxEEfSvKg2mezJXjY5uVTHIyN2qInNeonpc8iWjsJmkoICimI --- > nbgqw4qle26yxEEfSvKg2mezJXjY5uVTHIyN2qInNeonpc8iWjsJmkoICimI 265c265 < AmikwQtJSG2FFCEgoobGQE0matoTClxU7CQEUlCKDNGaYXAUtKQ0FFIT --- > AmikwQtJSG2FFCEgoobGFFJIQE0matoTClxU7CQEUlCKDNGaYXAUtKQ0FFIT 397c397 < k71kxj1OO1aGnxu/3Bms6rtBs68N8ZLenUio7Vgp5rOnK9PQ3qP97ct/ (... 20 other differences not shown) Thanks anyway for this very important function as we cannot use imap_fetchbody because of memory limitations. Hope this helps, Christophe. -- Edit bug report at http://bugs.php.net/?id=43670&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43670&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43670&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43670&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43670&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43670&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43670&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43670&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=43670&r=needscript Try newer version: http://bugs.php.net/fix.php?id=43670&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43670&r=support Expected behavior: http://bugs.php.net/fix.php?id=43670&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43670&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43670&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43670&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43670&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43670&r=dst IIS Stability: http://bugs.php.net/fix.php?id=43670&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43670&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43670&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43670&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=43670&r=mysqlcfg