From: salmon318 at hotmail dot com Operating system: Windows PHP version: 5.1.1 PHP Bug Type: *Math Functions Bug description: base64_decode bug
Description: ------------ Upgraded to 5.1.1 from 5.0.5 and our application was totally broken. We found that base64_decode in 5.1.1 behaves differently than 5.0.5. Basically, if there is a SPACE in the string to be decoded, problem comes up. There are similar article on version 4.0.x but nothing on 5.1.1 so I think it is not fixed in 5.1.x yet. Reproduce code: --------------- Try the following code on both PHP 5.0.5 vs 5.1.1: <? $str = "a bc"; echo base64_decode($str); ?> You will get different result. This only happens if there is a space. Maybe base64_encode has the similar problem too. Expected result: ---------------- Php 5.0.5 and below has this result: kæÜ Php 5.1.1 got this result: i· -- Edit bug report at http://bugs.php.net/?id=35649&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35649&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35649&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35649&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35649&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35649&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35649&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35649&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35649&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35649&r=support Expected behavior: http://bugs.php.net/fix.php?id=35649&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35649&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35649&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35649&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35649&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35649&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35649&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35649&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35649&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35649&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35649&r=mysqlcfg