douou9094747 2013-08-09 09:55
浏览 157

Codeigniter跨域会话

I,ve one question left about Codeigniter sessions. I have three domains:

On the first domain users can login in the system. But they also van login for the last two domains. So for the users we have one database for three systems.

So when an user log in on http://mijn.m4th.nl/ they are also logged in on for example http://m4th2.nl/. On the localhost it worked perfectly. The three systems used the same session. I set the session encryption key for the three Codeigniter installations the same.

But when i install this systems on the three domains the session is not shared like the localhost. The domains are on the same server.

Does someone know how to solve this problem? I tried already to save the session in my user db. But when we connect both systems to that table the session is not shared.

Here are my settings for http://mijn.m4th.nl. The settings on the other systems are the same.

$config['sess_cookie_name']     = 'ci_session';
$config['sess_expiration']      = 7200;
$config['sess_expire_on_close'] = FALSE;
$config['sess_encrypt_cookie']  = FALSE;
$config['sess_use_database']    = TRUE;
$config['sess_table_name']      = 'ci_sessions';
$config['sess_match_ip']        = FALSE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update']  = 300;
$config['cookie_prefix']    = "";
$config['cookie_domain']    = "";
$config['cookie_path']      = "/";
$config['cookie_secure']    = FALSE;

Thanks!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 SQL Server下载
    • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
    • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型
    • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?
    • ¥15 python爬取bilibili校园招聘网站
    • ¥30 求解达问题(有红包)
    • ¥15 请解包一个pak文件
    • ¥15 不同系统编译兼容问题
    • ¥100 三相直流充电模块对数字电源芯片在物理上它必须具备哪些功能和性能?
    • ¥30 数字电源对DSP芯片的具体要求