Re-initiating an autostarted session

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

 



Hi there,

I have some problems with PHP session handling. I have set to .htaccess file that PHP will start sessions and use cookies only automatically. Everything works fine until I need to re-initiate the session (give a new session ID and destroy the old one). For some reason, the old session id persists.

I use the following functions:

session_destroy();
session_regenerate_id();
session_write_close();
Header("Location: ...");
exit;

For my point of view, this should do exactly what I like to do: destroy the old session data, generate a new one, write them and redirect the user to next page.

I remember somehow that there have been problems with SetCookie and Header("Location: ..") combination. Could this session problem arise due same reasons?

Well, I'm happy to hear the fixes or workarounds. =)

Thanks,
Ville

--
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