php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34740 Really sorry, not enough space here to enter - see description
Submitted: 2005-10-05 12:31 UTC Modified: 2005-10-05 13:50 UTC
From: ceo at creamentas dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.4.0 OS: any unix
Private report: No CVE-ID: None
 [2005-10-05 12:31 UTC] ceo at creamentas dot com
Description:
------------
Spent 2 days to got the problem 
please use this session values (it's serialized) to see it yourself

with this session values when I have an object with any method name that has 2 arguments (var1, var2) when I call it both arguments have var2 value

the bug arise only on unix based platform - windows is ok. I've checked it on 3 different servers

Thank you for PHP development :)

Reproduce code:
---------------
<?php
class ClassName {	

	function ClassName() {		
	}

	function AnyName($v1,$v2) {
		echo 'Method called with param '.$v1.'<br>';		
		exit;
	}
}
$Obj = new ClassName();
session_start();

$superString = 'a:6:{s:8:"oldDebug";a:6:{s:7:"prevGet";a:0:{}s:8:"prevPost";a:0:{}s:11:"prevSession";a:5:{s:18:"AUTH_url_requested";s:32:"tree.php?type=products_catalogue";s:21:"AUTH_script_requested";s:0:"";s:15:"AUTH_last_login";s:19:"2005-10-05 10:44:42";s:15:"AUTH_last_visit";s:19:"2005-10-05 10:44:48";s:6:"sid_cp";s:32:"81ea67692167a073d9f09af4d7aafef1";}s:10:"prevCookie";a:2:{s:10:"machine-id";s:26:"217.21.60.10:1128419218684";s:9:"PHPSESSID";s:32:"ef56201655fc6ecdc891624ac148e108";}s:9:"prevFiles";a:0:{}s:7:"prevSql";a:5:{i:0;a:2:{s:3:"sql";s:31:"set database \'xtgate_allforfun\'";s:4:"time";s:19:"0.00018095970153809";}i:1;a:2:{s:3:"sql";s:67:"SELECT * FROM users_cp WHERE sid=\'81ea67692167a073d9f09af4d7aafef1\'";s:4:"time";s:19:"0.00066399574279785";}i:2;a:2:{s:3:"sql";s:27:"LOCK TABLES  users_cp WRITE";s:4:"time";s:19:"0.00012993812561035";}i:3;a:2:{s:3:"sql";s:46:"UPDATE users_cp SET lastdate=NOW() WHERE id=17";s:4:"time";s:19:"0.00028514862060547";}i:4;a:2:{s:3:"sql";s:13:"UNLOCK TABLES";s:4:"time";s:19:"8.4877014160156E-05";}}}s:18:"AUTH_url_requested";R:6;s:15:"AUTH_last_login";R:8;s:15:"AUTH_last_visit";R:9;s:6:"sid_cp";R:10;s:13:"cms_tree_name";s:18:"products_catalogue";}';

$_SESSION = unserialize($superString);

$Obj->AnyName("arg1","arg2");
?>

Expected result:
----------------
arg1

Actual result:
--------------
arg2

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-05 12:58 UTC] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Your first and biggest mistake: $_SESSION = unserialize(..)..
You obviously don't know what your doing so please ask questions how to use PHP on the mailing lists.

Hint: Do NOT mess references, classes and/or objects with sessions!

 [2005-10-05 13:31 UTC] ceo at creamentas dot com
Guyz... I realise that you are busy and recive a lot of records to check ...

But please respect other people and frazes like "You obviously don't know what your doing" huh  

I do realise, absolutly , that's why I have posted this

the reason why you see 
$_SESSION = unserialize($superString);
is that to see this bug you need to have the same session value as I do. Because Session influence on how PHP (sounds like nonsese but that's where the bug is) 

Also ... before rejecting something please copy the attached php code I did for you paste in a file open broswer run and then refresh (from the first run session will be set and when you refresh you'll see the problem)

have a good day, Sniper
 [2005-10-05 13:50 UTC] ceo at creamentas dot com
btw - looks like such problem do not arise with apache 2.x
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 30 00:01:30 2024 UTC