Migrating legacy code - changing session name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello List

A client has asked me to migrate a few scripts that have been running
merrily under PHP4 to PHP5.2. Part of these scripts have integration
with PHPMyAdmin
using the single sign-on and so they make use of the following code :

session_write_close();
session_name("blah");
session_start();

Now, assuming that prior to session_write_close(), I have a session
that (amongst other elements) contains the following:

$_SESSION['a'] = (an instance of Object A)
$_SESSION['b'] = (an instance of Object B)
$_SESSION['c'] = (an instance of Object C)

After session_start(), I have the following :

$_SESSION['a'] = (an instance of Object C)
$_SESSION['b'] = (an instance of Object C)
$_SESSION['c'] = (an instance of Object C)

This does not consistently happen, only under particular circumstances
(it seems to be a certain set of elements in $_SESSION triggers it).
For instance, if I unset $_SESSION['b'] * prior* to doing
session_write_close() - the behaviour stops, and the elements are
retained. Has anybody seen this before?


Vital Stats:

PHP5.2
Apache1.3
FastCGI
Sessions are stored using PHP5's default session handling.

Thanks in advance

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux