|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32233 unappropriate session warning
Submitted: 2005-03-08 17:33 UTC Modified: 2005-03-20 23:07 UTC
Avg. Score:3.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: cohen1 at gmail dot com Assigned:
Status: No Feedback Package: Session related
PHP Version: 5.0.3 OS: FreeBSD 5.3-RELEASE
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2005-03-08 17:33 UTC] cohen1 at gmail dot com
When I load a simplexml object into a session var. after doing session_start() the rest of the page completes, but next time load the page and it does session_start() in the same browser session, I get a warning:
Warning: session_start() [function.session-start]: Node no longer exists in ... on line 46
Line 46: session_start()

I found out that the problem only happens when i do this:
$_SESSION['orderprice'] = $rtn->products->product[0]['price'];

var_dump($rtn->products->product[0]['price']) prints:
object(SimpleXMLElement)#11 (1) { [0]=> string(3) "0.5" } 

If i do:
$_SESSION['orderprice'] = (string)$rtn->products->product[0]['price'];

There is no problem at all.
First php bug report, bear with me please.

Reproduce code:
$_SESSION['orderprice'] = $rtn->products->product[0]['price'];

yelds warning in session_start()

if i do:
$_SESSION['orderprice'] = (string)$rtn->products->product[0]['price'];

there is no problem.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-09 00:38 UTC]
Please try using this CVS snapshot:
For Windows:

 [2005-03-20 18:14 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

 [2006-05-21 21:10 UTC] j dot posthuma at gmail dot com
I have the latest cvs ( PHP 5.2.x May 21, 2006 18:30 GMT ) and the bug is still here @ Windows XP SP2 + Apache 2 + MySQL 5, the solution of cohen1 is allso not working at my server.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 23 18:01:30 2024 UTC