保持LDAP会话

In PHP, say I have an LDAP connection on page 1:

$ldapconn = ldap_connect($ldapserver);
if ($ldapconn) {
      // binding to ldap server
      $ldapbind = ldap_bind($ldapconn, $ldaprdn, $ldappass);
}
// do stuff here

Assuming everything goes well and I'm able to actually do stuff, how can I save this bind so that when a user clicks on a 2nd page I don't need to again do an ldap_bind using their username/password. In essence I don't want to store the password in the session if avoidable for security purposes, but I'd like to keep the connection so that I can reuse it on other pages.

查看全部
doutan2111
doutan2111
2012/11/16 18:59
  • bind
  • ldap
  • session
  • php
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

3个回复