No.
>From Zend_Session.php
/**
* setId() - set an id to a user specified id
*
* @throws Zend_Session_Exception
* @param string $id
* @return void
*/
public static function setId($id)
{
if (!self::$_unitTestEnabled && defined('SID')) {
/** @see Zend_Session_Exception */
require_once 'Zend/Session/Exception.php';
throw new Zend_Session_Exception('The session has already been
started. The session id must be set first.');
}
//...
Always throw exception if SID is defined.
PHP manual is also clear about this (
http://www.php.net/manual/en/function.session-id.php):
"If *id* is specified, it will replace the current session id. *session_id()
* needs to be called before
session_start()<http://www.php.net/manual/en/function.session-start.php>
for
that purpose."
Regards,
Saša Stamenković
On Tue, Feb 2, 2010 at 1:07 PM, Pádraic Brady <[email protected]>wrote:
> That's odd - you should be able to regenerate the ID if the session has
> started. How else could you regenerate it? There may, of course, be an issue
> in regenerating an ID so late that the cookie can't be sent, but this should
> kick out an error or something anyway.
>
> Pádraic Brady
>
> http://blog.astrumfutura.com
> http://www.survivethedeepend.com
> OpenID Europe Foundation Irish Representative<http://www.openideurope.eu/>
>
>
> ------------------------------
> *From:* Саша Стаменковић <[email protected]>
> *To:* [email protected]
> *Sent:* Mon, February 1, 2010 2:50:48 PM
> *Subject:* Re: [fw-general] Re: Zend_Session setId
>
> Looking at Zend_SessionTest::testRegenerateId, looks like it's not possible
> to set another session ID if session is already started.
>
> Regards,
> Saša Stamenković
>
>
> On Mon, Feb 1, 2010 at 3:45 PM, umpirsky <[email protected]> wrote:
>
>>
>> I'm integrating uploadify, because of Flash Cookie Bug
>> (http://swfupload.org/forum/generaldiscussion/383) I need to set session
>> ID.
>> So, I have same problem, can anyone help?
>>
>> How to restart session with new session ID?
>>
>> Regards,
>> Sasa Stamenkovic.
>> --
>> View this message in context:
>> http://n4.nabble.com/Zend-Session-setId-tp643859p1458847.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>
>
>