php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28328 error encoding using base64_encode and base64_decode
Submitted: 2004-05-08 22:48 UTC Modified: 2004-05-17 01:00 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: amr_hossam at hotmail dot com Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 4.3.4 OS: Windows NT
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: amr_hossam at hotmail dot com
New email:
PHP Version: OS:

 

 [2004-05-08 22:48 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-17 01:00 UTC] php-bugs at lists dot php dot net
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".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Dec 11 13:01:29 2024 UTC