#32233 [NEW]: unappropriate session warning
| From: | cohen1 at gmail dot com | Date: | Tue, 08 Mar 2005 16:33:06 +0000 |
| Subject: | #32233 [NEW]: unappropriate session warning | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-76709@lists.php.net to get a copy of this message | ||
From: cohen1 at gmail dot com
Operating system: FreeBSD 5.3-RELEASE
PHP version: 5.0.3
PHP Bug Type: Compile Warning
Bug description: unappropriate session warning
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.
--
Edit bug report at http://bugs.php.net/?id=32233&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32233&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32233&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32233&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=32233&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=32233&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=32233&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=32233&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=32233&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32233&r=support
Expected behavior: http://bugs.php.net/fix.php?id=32233&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=32233&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=32233&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=32233&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32233&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=32233&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=32233&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32233&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=32233&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=32233&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=32233&r=mysqlcfg