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 Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or 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

Add a Patch

Pull Requests

Add a Pull Request

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: Sat May 11 00:01:31 2024 UTC