|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11918 Serialization?
Submitted: 2001-07-05 22:59 UTC Modified: 2002-07-04 01:00 UTC
From: fabiankessler at usa dot net Assigned:
Status: No Feedback Package: Scripting Engine problem
PHP Version: 4.0.6 OS: win2k
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.
Block user comment
Status: Assign to:
Bug Type:
From: fabiankessler at usa dot net
New email:
PHP Version: OS:


 [2001-07-05 22:59 UTC] fabiankessler at usa dot net

first of all, i'm not able to reproduce that. sorry. it only occures in the context of my scripts.

occures in 4.0.5 also.

$pos = strpos(strToLower($string), strToLower($accessKey));
echo $pos . " -" . $string . ' ' . $accessKey . "<br>\n";

this prints out '1 -Username U when it should be a 0 instead. when i do

if ($string === 'Username') $string = 'Username';

before, there's no problem. of course a var_dump() of $string shows string(8) "Username".

in the same context, 

$t = array('<u>', '</u>');
echo $t[1];

spits out a few strange characters (others each time) 
instead of the '</u>'. and a var_dump() of $t even crashes 

the value of $string ('Username') comes from mysql, it's a serialized value, and looks like: ;s:8:"Username"; so this should be fine.

well, maybe this sounds familiar to you. to me it looks *very* strange. again, i'm not able to reproduce it.



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-05 23:08 UTC] fabiankessler at usa dot net

1) $pos is not === FALSE
2) the vars $pos, $string and $accessKey are not used anyhow else or anywhere else in that scope (method), and not included using global
3) if i 'initialise' $pos somehow
$pos = 'someshit';
$pos = strpos(strToLower($string), strToLower($accessKey));
or do the strpos() twice, i get the 0 and not the 1. and the array problem (strange characters) is gone also.


 [2001-07-09 19:08 UTC]
Could be serialization problem. Try to hard code the serialized value in your script, and compare that to your normal string.

If you cannot reproduce it in any way, it'll be hard to find the problem.

$string = unserialize('s:8:"Username";');
$accessKey = 'U';

Just before the problematic piece in your script? Or whatever the actual value is of the serialized database-item?
 [2002-06-02 14:02 UTC]
Update status
 [2002-07-04 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, 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 Mar 02 17:01:28 2024 UTC