php.net |  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
Votes:2
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
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: cohen1 at gmail dot com
New email:
PHP Version: OS:

 

 [2005-03-08 17:33 UTC] cohen1 at gmail dot com
Description:
------------
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_start();
$_SESSION['orderprice'] = $rtn->products->product[0]['price'];

yelds warning in session_start()

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

there is no problem.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-09 00:38 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-03-20 18:14 UTC] sniper@php.net
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: Fri Mar 29 06:01:29 2024 UTC