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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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: Thu Dec 26 16:01:31 2024 UTC