Symfony会话变量在ipad中丢失

时间:2021-12-28 03:49:12

I am working on a symfony application. It works fine in all browsers and even Mac safari. The issues exists only in ipad. Few of my session variables gets lost in other pages. for example:

我正在研究symfony应用程序。它适用于所有浏览器甚至Mac Safari。问题仅存在于ipad中。我的会话变量很少在其他页面中丢失。例如:

I set the session as :

我将会话设置为:

$this->getUser()->setAttribute('domainname', $this->domain);

This value could be retrieved in other pages in every browsers by :

可以通过以下方式在每个浏览器的其他页面中检索此值:

 $this->domain = $this->getUser()->getAttribute('domainname');

But in ipad device (safari), my variables are not retrieving.

但在ipad设备(safari)中,我的变量没有检索。

1 个解决方案

#1


0  

Check the session ID storage mechanism. Is the session ID stored in cookies or on files in the server, db or other methods. If its in cookies and your Ipad browsers dont allow cookies thats most likely the reason. http://php.net/manual/en/session.idpassing.php

检查会话ID存储机制。会话ID是存储在cookie中还是存储在服务器,db或其他方法中的文件中。如果它在cookie和你的Ipad浏览器不允许cookie,这很可能是原因。 http://php.net/manual/en/session.idpassing.php

#1


0  

Check the session ID storage mechanism. Is the session ID stored in cookies or on files in the server, db or other methods. If its in cookies and your Ipad browsers dont allow cookies thats most likely the reason. http://php.net/manual/en/session.idpassing.php

检查会话ID存储机制。会话ID是存储在cookie中还是存储在服务器,db或其他方法中的文件中。如果它在cookie和你的Ipad浏览器不允许cookie,这很可能是原因。 http://php.net/manual/en/session.idpassing.php