#36946 [Opn->Fbk]: base64_decode doesn't work
ID: 36946
Updated by: tony2001@php.net
Reported By: kirlo at gmx dot de
-Status: Open
+Status: Feedback
Bug Type: *URL Functions
Operating System: windows & debian
PHP Version: 5.1.2
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc.
If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.
Previous Comments:
------------------------------------------------------------------------
[2006-04-02 10:49:24] kirlo at gmx dot de
Description:
------------
we're encoding some text data with base64 with a small application (not
php) on a client pc, then we'll send it to a webserver via POST or GET.
the PHP script is fetching POST or GET without any problems but it does
not correctly perform the base64_decode operation. we checked our base64
encoded text with other tools (for example
http://makcoder.sourceforge.net/demo/base64.php
) and they had no
problems!
this system works with the latest php4 version but it does not work
with the latest php5 version (on the earlier version it also worked
well!). i already tried the latest CVS snapshot but it didn't worked
either.
Reproduce code:
---------------
very simple:
echo base64_decode($_POST[base64text]);
Expected result:
----------------
here are three files
the original text:
http://t-man.isr-clan.ath.cx/phpbugreport/original.txt
the base64 encoded text (base64 encoding performed by our client
application):
http://t-man.isr-clan.ath.cx/phpbugreport/base64encoded.txt
the base64_decode output:
http://t-man.isr-clan.ath.cx/phpbugreport/base64_decode-output.txt
in this case the messed up text is at the end of the text. sometimes
the messed up text is starting at the first 2 or 3 lines.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36946&edit=1
Thread (8 messages)