{"id":1600,"date":"2022-08-30T15:17:53","date_gmt":"2022-08-30T15:17:53","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/27\/symfony2-php-5-4-4-cannot-change-the-id-of-an-active-session-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:17:53","modified_gmt":"2022-08-30T15:17:53","slug":"symfony2-php-5-4-4-cannot-change-the-id-of-an-active-session-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/symfony2-php-5-4-4-cannot-change-the-id-of-an-active-session-collection-of-common-programming-errors\/","title":{"rendered":"Symfony2 PHP 5.4.4 Cannot change the ID of an active session-Collection of common programming errors"},"content":{"rendered":"<p>Currently, we install our web application in Symfony2 and we find a blocking problem.<\/p>\n<blockquote>\n<p>vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpFoundation\/Session\/Storage\/Proxy\/AbstractProxy.php throw new \\LogicException(&#8216;Cannot change the ID of an active session&#8217;);<\/p>\n<\/blockquote>\n<blockquote>\n<p>in kernel.root_dir\/cache\/dev\/classes.php at line 484 -+ public function setId($id) { if ($this-&gt;isActive()) { throw new \\LogicException(&#8216;Cannot change the ID of an active session&#8217;); } session_id($id); at AbstractProxy -&gt;setId (&#8217;09g5hbsvg1apk8d32k52l19rr5&#8242;) in kernel.root_dir\/cache\/dev\/classes.php at line 208 -+ at NativeSessionStorage -&gt;setId (&#8217;09g5hbsvg1apk8d32k52l19rr5&#8242;) in kernel.root_dir\/cache\/dev\/classes.php at line 780 -+ at Session -&gt;setId (&#8217;09g5hbsvg1apk8d32k52l19rr5&#8242;) in \/home\/wwwmain\/www_v5\/vendor\/symfony\/symfony\/src\/Symfony\/Bundle\/FrameworkBundle\/EventListener\/TestSessionListener.php at line 54 -+ at TestSessionListener -&gt;onKernelRequest (object(GetResponseEvent)) at call_user_func (array(object(TestSessionListener), &#8216;onKernelRequest&#8217;), object(GetResponseEvent)) in \/home\/wwwmain\/www_v5\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/Debug\/ContainerAwareTraceableEventDispatcher.php at line 139 -+ at ContainerAwareTraceableEventDispatcher -&gt;doDispatch (array(array(object(ProfilerListener), &#8216;onKernelRequest&#8217;), array(object(TestSessionListener), &#8216;onKernelRequest&#8217;), array(object(SessionListener), &#8216;onKernelRequest&#8217;), array(object(RouterListener), &#8216;onKernelRequest&#8217;), array(object(LocaleListener), &#8216;onKernelRequest&#8217;), array(object(Firewall), &#8216;onKernelRequest&#8217;), array(object(RequestListener), &#8216;onKernelRequest&#8217;), array(object(TwigExtension2), &#8216;onKernelRequest&#8217;), array(object(RequestListener), &#8216;onKernelRequest&#8217;)), &#8216;kernel.request&#8217;, object(GetResponseEvent)) in kernel.root_dir\/cache\/dev\/classes.php at line 4781 -+ at EventDispatcher -&gt;dispatch (&#8216;kernel.request&#8217;, object(GetResponseEvent)) in kernel.root_dir\/cache\/dev\/classes.php at line 4999 -+ at ContainerAwareEventDispatcher -&gt;dispatch (&#8216;kernel.request&#8217;, object(GetResponseEvent)) in \/home\/wwwmain\/www_v5\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/Debug\/ContainerAwareTraceableEventDispatcher.php at line 78 -+ at ContainerAwareTraceableEventDispatcher -&gt;dispatch (&#8216;kernel.request&#8217;, object(GetResponseEvent)) in kernel.root_dir\/bootstrap.php.cache at line 1412 -+ at HttpKernel -&gt;handleRaw (object(Request), &#8216;1&#8217;) in kernel.root_dir\/bootstrap.php.cache at line 1392 -+ at HttpKernel -&gt;handle (object(Request), &#8216;1&#8217;, true) in kernel.root_dir\/bootstrap.php.cache at line 1568 -+ at HttpKernel -&gt;handle (object(Request), &#8216;1&#8217;, true) in kernel.root_dir\/bootstrap.php.cache at line 619 -+ at Kernel -&gt;handle (object(Request)) in \/home\/wwwmain\/www_v5\/web\/app_dev.php at line 25 -+<\/p>\n<\/blockquote>\n<blockquote>\n<p>DEBUG &#8211; Notified event &#8220;kernel.request&#8221; to listener &#8220;Symfony\\Component\\HttpKernel\\EventListener\\ProfilerListener::onKernelRequest&#8221;. DEBUG &#8211; Notified event &#8220;kernel.request&#8221; to listener &#8220;Symfony\\Bundle\\FrameworkBundle\\EventListener\\TestSessionListener::onKernelRequest&#8221;. DEBUG &#8211; Notified event &#8220;kernel.exception&#8221; to listener &#8220;Symfony\\Component\\HttpKernel\\EventListener\\ProfilerListener::onKernelException&#8221;. DEBUG &#8211; Notified event &#8220;kernel.exception&#8221; to listener &#8220;Symfony\\Component\\HttpKernel\\EventListener\\ExceptionListener::onKernelException&#8221;. CRITICAL &#8211; LogicException: Cannot change the ID of an active session (uncaught exception) at \/home\/wwwmain\/www_v5\/app\/cache\/dev\/classes.php line 484 DEBUG &#8211; Notified event &#8220;kernel.request&#8221; to listener &#8220;Symfony\\Component\\HttpKernel\\EventListener\\ProfilerListener::onKernelRequest&#8221;. DEBUG &#8211; Notified event &#8220;kernel.request&#8221; to listener &#8220;Symfony\\Bundle\\FrameworkBundle\\EventListener\\TestSessionListener::onKernelRequest&#8221;. DEBUG &#8211; Notified event &#8220;kernel.request&#8221; to listener &#8220;Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener::onKernelRequest&#8221;. DEBUG &#8211; Notified event &#8220;kernel.request&#8221; to listener &#8220;Symfony\\Component\\HttpKernel\\EventListener\\RouterListener::onKernelRequest&#8221;. DEBUG &#8211; Notified event &#8220;kernel.request&#8221; to listener &#8220;Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener::onKernelRequest&#8221;. DEBUG &#8211; Notified event &#8220;kernel.request&#8221; to listener &#8220;Symfony\\Component\\Security\\Http\\Firewall::onKernelRequest&#8221;. DEBUG &#8211; Notified event &#8220;kernel.request&#8221; to listener &#8220;Eyrolles\\CompteBundle\\Service\\RequestListener::onKernelRequest&#8221;. DEBUG &#8211; Notified event &#8220;kernel.request&#8221; to listener &#8220;Eyrolles\\EcommerceBundle\\Twig\\Extension\\TwigExtension2::onKernelRequest&#8221;. DEBUG &#8211; Notified event &#8220;kernel.request&#8221; to listener &#8220;Symfony\\Bundle\\AsseticBundle\\EventListener\\RequestListener::onKernelRequest&#8221;. DEBUG &#8211; Notified event &#8220;kernel.controller&#8221; to listener &#8220;Symfony\\Bundle\\FrameworkBundle\\DataCollector\\RouterDataCollector::onKernelController&#8221;. DEBUG &#8211; Notified event &#8220;kernel.controller&#8221; to listener &#8220;Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ControllerListener::onKernelController&#8221;. DEBUG &#8211; Notified event &#8220;kernel.controller&#8221; to listener &#8220;Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ParamConverterListener::onKernelController&#8221;. DEBUG &#8211; Notified event &#8220;kernel.controller&#8221; to listener &#8220;Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\TemplateListener::onKernelController&#8221;. DEBUG &#8211; Notified event &#8220;kernel.controller&#8221; to listener &#8220;Symfony\\Component\\HttpKernel\\DataCollector\\RequestDataCollector::onKernelController&#8221;.<\/p>\n<\/blockquote>\n<p id=\"rop\"><small>Originally posted 2013-11-27 12:00:50. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>Currently, we install our web application in Symfony2 and we find a blocking problem. vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpFoundation\/Session\/Storage\/Proxy\/AbstractProxy.php throw new \\LogicException(&#8216;Cannot change the ID of an active session&#8217;); in kernel.root_dir\/cache\/dev\/classes.php at line 484 -+ public function setId($id) { if ($this-&gt;isActive()) { throw new \\LogicException(&#8216;Cannot change the ID of an active session&#8217;); } session_id($id); at AbstractProxy -&gt;setId (&#8217;09g5hbsvg1apk8d32k52l19rr5&#8242;) in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1600","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1600","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1600"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1600\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1600"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1600"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}