在多个服务器上维护单个会话

编程入门 行业动态 更新时间:2024-10-27 07:17:52
本文介绍了在多个服务器上维护单个会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

您好, 我正在尝试使用PHP5为不同服务器上的不同 域找到解决登录机制的解决方案。 我有一个主域名用户数据和其他几个域名需要登录才能显示数据。 我想要用户在访问我的任何域时只登录一次。 第一个想法是对所有域使用相同的会话。这可能是 吗? 感谢任何帮助或提示。 提前致谢 最好的问候 Samir

Hello, I am trying to find a solution to a login mechanism for different domains on different servers with PHP5. I have one main domain with the user data and several other domains that need a login to show data. I want the user to login only once when he visits any of my domains. The first idea is had is to use the same session for all domains. Is this possible? Any help or hint is appreciated. Thanks in advance Best regards Samir

推荐答案

Samir Chouaieb写道: Samir Chouaieb wrote: 您好, 我正在尝试为不同服务器上的不同 域找到登录机制的解决方案PHP5。 我有一个主域名用户数据和其他几个域名 需要登录才能显示数据。 我希望用户在访问我的任何域时只登录一次。 第一个想法是对所有域使用相同的会话。这可能是 吗? 感谢任何帮助或提示。 提前致谢 最好的问候 Samir Hello, I am trying to find a solution to a login mechanism for different domains on different servers with PHP5. I have one main domain with the user data and several other domains that need a login to show data. I want the user to login only once when he visits any of my domains. The first idea is had is to use the same session for all domains. Is this possible? Any help or hint is appreciated. Thanks in advance Best regards Samir

不,它不是。 Cookie旨在针对特定领域。为了安全 的原因,浏览器不会发送属于一个域的cookie到 另一个域。 如果所有这些网站都是如此密切相关,为什么它们是不同的网站? - ================ == 删除x来自我的电子邮件地址 Jerry Stuckle JDS计算机培训公司 js ******* @ attglobal ==================

No, it''s not. Cookies are designed to be domain specific. For security reasons, the browser won''t send a cookie belonging to one domain on to another domain. If all of these sites are so closely related, why are they different sites? -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. js*******@attglobal ==================

首先感谢您的回答。 Hi, thanks first of all for your answer. 不,它不是。 Cookie是专门针对特定领域的。 出于安全考虑,浏览器不会将属于一个域的Cookie $ / b $ b发送到另一个域。 No, it''s not. Cookies are designed to be domain specific. For security reasons, the browser won''t send a cookie belonging to one domain on to another domain.

您只考虑了cookie作为存储会话ID的方法。

You took only the cookies into consideration as a way to store session-ids.

如果全部这些网站是如此密切相关,为什么他们不同的网站? If all of these sites are so closely related, why are they different sites?

以一组具有中央 登录机制的合作伙伴在线商店为例。 如果在线商店的登录页面在 主域名上调用专用的php页面,如果没有完成,则实现登录,并将 会话ID返回给url中的referer页面或POST变量。 如果不同的商店在主域服务器上的会话变量具有相同的php路径,那么他们就可以在会议中阅读 的内容。 这是否有意义。或者我在做什么? 问候 Samir Jerry Stuckle写道:

Take as an example a set of partner online shops that have a central login mechanism. If the login pages of the online shops call a dedicated php-page on the main domain that achieves the login if not done aready and gives the session-id back to the referer page in the url or as POST variable. if the different shops have the same php-path for session variables on the main-domain server, then they will be able to read the content of the session. Does this make a sense. Or am I dreaming? Regards Samir Jerry Stuckle wrote:

Samir Chouaieb写道: Samir Chouaieb wrote: >您好, 我正在尝试为不同的登录机制找到解决方案使用PHP5的不同服务器上的域。 我有一个主域,其中包含用户数据和其他几个需要登录才能显示数据的域。 第一个想法是对所有域使用相同的会话。 这可能吗? 任何帮助或提示都表示赞赏。 提前致谢 最好的问候 Samir >Hello,I am trying to find a solution to a login mechanism for differentdomains on different servers with PHP5.I have one main domain with the user data and several other domainsthat need a login to show data.I want the user to login only once when he visits any of my domains.The first idea is had is to use the same session for all domains. Isthis possible?Any help or hint is appreciated.Thanks in advanceBest regardsSamir

不,它不是。 Cookie旨在针对特定领域。为了安全 的原因,浏览器不会发送属于一个域的cookie到 另一个域。 如果所有这些网站都是如此密切相关,为什么它们是不同的网站?

No, it''s not. Cookies are designed to be domain specific. For security reasons, the browser won''t send a cookie belonging to one domain on to another domain. If all of these sites are so closely related, why are they different sites?

Samir Chouaieb写道: Samir Chouaieb wrote: Jerry Stuckle写道: Jerry Stuckle wrote: > Samir Chouaieb写道: >Samir Chouaieb wrote: >>您好, 我正在尝试使用PHP5找到不同服务器上不同域名的登录机制的解决方案。 我有一个主域名包含用户数据和其他几个需要登录才能显示数据的域名。 我希望用户在访问我的任何域名时只登录一次。 第一个想法是对所有域使用相同的会话。 这可能吗? 任何帮助或提示都表示赞赏。 提前致谢 最好的问候 Samir >>Hello,I am trying to find a solution to a login mechanism for differentdomains on different servers with PHP5.I have one main domain with the user data and several other domainsthat need a login to show data.I want the user to login only once when he visits any of my domains.The first idea is had is to use the same session for all domains. Isthis possible?Any help or hint is appreciated.Thanks in advanceBest regardsSamir

不,不是。 Cookie旨在针对特定领域。出于安全原因,浏览器不会将属于一个域的cookie发送到另一个域。 如果所有这些站点都密切相关,为什么他们不同的网站?

No, it''s not. Cookies are designed to be domain specific. Forsecurity reasons, the browser won''t send a cookie belonging to onedomain on to another domain.If all of these sites are so closely related, why are they differentsites?

首先感谢您的回答。

Hi, thanks first of all for your answer.

不,它不是。 Cookie是专门针对特定领域的。 出于安全考虑,浏览器不会将属于一个域的Cookie $ / b $ b发送到另一个域。 No, it''s not. Cookies are designed to be domain specific. For security reasons, the browser won''t send a cookie belonging to one domain on to another domain.

您只考虑了cookie作为存储的方式

You took only the cookies into consideration as a way to store

session-ids。

session-ids.

> > 如果所有这些网站都如此密切相关,为什么他们会在不同的网站上支付b ? If all of these sites are so closely related, why are they different sites?

以一组具有中央 登录机制的合作伙伴在线商店为例。 如果在线商店的登录页面在 主域名上调用了一个专用的php页面,如果没有完成,则会实现登录,并提供 会话 - id返回url中的referer页面或POST变量。 如果不同的商店在会话变量上有相同的php路径 主要-domain服务器,然后他们将能够阅读会话的内容 . 这是否有意义。或者我在做什么? 问候 Samir

Take as an example a set of partner online shops that have a central login mechanism. If the login pages of the online shops call a dedicated php-page on the main domain that achieves the login if not done aready and gives the session-id back to the referer page in the url or as POST variable. if the different shops have the same php-path for session variables on the main-domain server, then they will be able to read the content of the session. Does this make a sense. Or am I dreaming? Regards Samir

(固定的帖子) 不,我不是在谈论包含会话ID的cookie。任何 cookie都是特定于域的。和会议一样,如果你很聪明的话。 其他任何东西,比如在

(Top posting fixed) No, I''m not talking about cookies which contain session id''s. Any cookie is domain specific. As will be the sessions, if you''re smart. Anything else like passing info back and forth in

来回传递信息

更多推荐

在多个服务器上维护单个会话

本文发布于:2023-06-10 22:56:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/620869.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多个   器上

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!