duan5731 2010-05-25 10:55
浏览 42
已采纳

在vBulletin论坛和status.net微博平台之间共享会话

I need to integrate vBulletin 4.0.3 Publishing Suite with status.net microblogging platform. The first thing I need to do is make these 2 to share 1 session so a user logged in vBulletin forums will also be logged in to status.net and vice versa.

I have installed different vBulletin components under different subdomains:

  1. forums.sample.com - vBulletin forums
  2. blogs.sample.com - vBulletin blogs
  3. sample.com - vBulletin content management

All of these point to the same place (.../public_html/index.php) which includes the respective php file (content.php for sample.com | blog.php for blogs.sample.com | forum.php for forums.sample.com) depending on the $_SERVER['HTTP_HOST']

I have configured vBulletin to use a single cookie.domain (.sample.com) for all of these 3 domains so visiting different domains doesn't break the session.

I also have status.sample.com, which is the subdomain where status.net is installed. The subdomain configuration is different so the document_root is actually a subfolder (.../public_html/status/) in sample.com

Now, can you please give me some pointers on how to make all these subdomains share a single session?

I'm not sure if it helps, but as I understand, status.net does no custom session handling by default, but it is possible to turn it on so it will start storing session data in a database table called "session". vBulletin stores sessions in the database by default.

Any tips will be appreciated.

Thank you.

  • 写回答

1条回答 默认 最新

  • dsh125986083 2010-05-25 11:14
    关注

    Even id they both share the session, it's useless to you. They would have to use the session the same way, meaning:

    • Store the same variables with the same keys (or each application put in session, apart from he data it needs, the data the other one needs).
    • Unless they use exactly the same data to perform the logins, they both would have to have access to username/definitions/whatever's stored in the session of the other application
    • If they stored objects, both would have to have access to the respective class definitions

    So, unless you're building your own applications and think about it from the beginning, forget about "sharing sessions". Implement a single sign-on like CAS or OpenID instead.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度