douyun3022
douyun3022
2015-03-03 20:21
浏览 60
已采纳

域和子域上的共享会话无法在Android手机上运行

I use

php_value session.cookie_domain ".domain.com"

in .htaccess to share sessions on the domain and all subdomains and it's working, except from android phone

Why is that ? Is there any way forward here ?

Ps. It's also not working if session.cookie_domain = .domain.com directcly in php.ini - the site have a lot of pages so a .htacces or php.ini way would be preferable

图片转代码服务由CSDN问答提供 功能建议

我使用

  php_value session.cookie_domain“.domain。 在.htaccess中com“
   
 
 

在域和所有子域上共享会话并且它正常工作,除了Android手机

这是为什么 ? 这里有什么办法吗?

Ps。 如果session.cookie_domain = .domain.com直接在php.ini中也没有用 - 该网站有很多页面,所以.htacces或php.ini方式更可取

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • dongyuji7309
    dongyuji7309 2015-11-23 10:20
    已采纳

    It was old cached data causing this. Cookies survived both when restarting the browser and phone with session.cookie_lifetime = 0 in php.ini. Manually deleting all personal data was resolving the issue.

    点赞 评论
  • doukuipei9938
    doukuipei9938 2015-03-04 00:35

    Session cookies are set when your client does not have any or if they expire. Unless you forcefully change their value (like name) they would not change. But some values like domain - we do not easily tend to forcefully change.

    This means that if a session cookie is set for +15 minutes then you shall either wait 15 mins or use session_destroy() or cleaar cookies from your browser manually.

    When the next cookie is set it shall work properly.

    点赞 评论

相关推荐