#28328 [Fbk->NoF]: error encoding using base64_encode and base64_decode
| From: | php-bugs at lists dot php dot net | Date: | Sun, 16 May 2004 23:00:06 +0000 |
| Subject: | #28328 [Fbk->NoF]: error encoding using base64_encode and base64_decode | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-59680@lists.php.net to get a copy of this message | ||
ID: 28328
Updated by: php-bugs@lists.php.net
Reported By: amr_hossam at hotmail dot com
-Status: Feedback
+Status: No Feedback
Bug Type: *General Issues
Operating System: Windows NT
PHP Version: 4.3.4
New Comment:
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
Previous Comments:
------------------------------------------------------------------------
[2004-05-09 19:34:27] iliaa@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2004-05-08 22:48:34] amr_hossam at hotmail dot com
Description:
------------
I wanted to encode some data to be used later through the base64_encode
and the base64_decode functions ...
I took some variables and encoded it, then when I want to decode these
data to display it, I found that it doesn't exist or can't be decoded
...
Reproduce code:
---------------
function docookie($setuid, $setusername, $setpass, $setstorynum,
$setumode, $setuorder, $setthold, $setnoscore, $setublockon, $settheme,
$setcommentmax) {
$info =
base64_encode("$setuid:$setusername:$setpass:$setstorynum:$setumode:$setuorder:$setthold:$setnoscore:$setublockon:$settheme:$setcommentmax");
}
function cookiedecode($user) {
global $user, $cookie;
$user = base64_decode($user);
$cookie = explode(":", $user);
}
Expected result:
----------------
variable $cookie[1] should contain the username entered
Actual result:
--------------
$cookie is empty .. doesn't contain any encoded or decoded data
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28328&edit=1