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条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥30 深度学习,前后端连接
    • ¥15 孟德尔随机化结果不一致
    • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
    • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
    • ¥15 谁有desed数据集呀
    • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
    • ¥15 关于#hadoop#的问题
    • ¥15 (标签-Python|关键词-socket)
    • ¥15 keil里为什么main.c定义的函数在it.c调用不了
    • ¥50 切换TabTip键盘的输入法