doulangbizhan5160 2010-10-18 10:38 采纳率: 100%
浏览 62

PHP希望$ _SERVER中的Shibboleth属性,但它们只在Provider的HTTP响应头中

As far as I understand there are two ways to get Shibboleth attributes:

  • they are either available on $_SERVER or
  • inside the HTTP header response (of the provider)

In the later case, how can I make them available to the application? Even if I catch them once and try to inject them in the server environment with putenv(), it will only be for the duration of the current request. I could load them in the session, but it just doesn't feel right.

  • 写回答

1条回答 默认 最新

  • duan0065626385 2010-10-18 20:42
    关注

    If they went into the server's environment, then every user's values would overwrite everyone else's on every request. That's why there's sessions, to store per-user persistent data. Of course, you could have the server reinject on every request, into just the child/thread's environment for that particular request, but unless the values are changing each time, why not just put them in the session to begin with?

    As well, in a multiple worker environment (like Apache's pre-fork), unless you somehow injected the variable into the parent process (the one that runs as root), you'd only be able to affect the one child. There's no guarantee that the next request will be processed by the same child. And even better, even if you injected the parent root-flagged process, the children wouldn't inherit that new environment until they naturally are shut down and the root parent forks a fresh child.

    评论

报告相同问题?

悬赏问题

  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 正弦信号发生器串并联电路电阻无法保持同步怎么办
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 个人网站被恶意大量访问,怎么办
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)