#38221 [NEW]: base64_encode produces invalidly encoded string
| From: | roiputrop at mailinator dot com | Date: | Wed, 26 Jul 2006 11:01:50 +0000 |
| Subject: | #38221 [NEW]: base64_encode produces invalidly encoded string | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-99921@lists.php.net to get a copy of this message | ||
From: roiputrop at mailinator dot com
Operating system: Ubuntu 6.06 LTS
PHP version: 5.1.4
PHP Bug Type: Mail related
Bug description: base64_encode produces invalidly encoded string
Description:
------------
Calling base64_encode in php does not produce valid base64 encoded
string.
The lines are too long, there should be a line break every 76 characters.
Example code below.
Reproduce code:
---------------
<?
$file = implode( "", file("http://bugs.php.net/gifs/logo-bug.gif")
);
print base64_encode($file);
?>
This produces a string with just one line.
Expected result:
----------------
Base 64. 114 lines of text.
Actual result:
--------------
Not base 64. One line of text.
--
Edit bug report at http://bugs.php.net/?id=38221&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38221&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38221&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38221&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38221&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=38221&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=38221&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=38221&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=38221&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=38221&r=support
Expected behavior: http://bugs.php.net/fix.php?id=38221&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=38221&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=38221&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38221&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38221&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38221&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=38221&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=38221&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=38221&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=38221&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=38221&r=mysqlcfg