My company is using the OpenLDAP plugin for Dokuwiki to secure our admin page. We originally had some setbacks when converting the wiki from an Arch Linux environment to a Windows environment because of configuration issues that I thought were solved. Then, we started getting issues with the LDAP's auth.php, specifically a missing argument error on our TLS error checking code. I fixed that, but now I am stuck with an HTTP Error 500 upon login. What else needs to be done to fix it? My local.php code is below:
`$conf['plugin']['authldap']['debug'] = 1;
$conf['plugin']['authldap']['modPass'] = 1;
//rest of LDAP stuff here
$conf['plugin']['authldap']['server'] = 'myserver'; //Alyse's edits
$conf['plugin']['authldap']['port'] = 389;
$conf['plugin']['authldap']['binddn'] = '%{user}@%{server}'; //Alyse's edits
$conf['plugin']['authldap']['usertree'] = 'dc=mydomain, dc=edu'; //Alyse's edits
$conf['plugin']['authldap']['grouptree'] = 'dc=mydomain, dc=edu'; //Alyse's edits
$conf['plugin']['authldap']['userfilter'] = '(userPrincipalName=%{user}@%{server})'; //Alyse's edits
$conf['plugin']['authldap']['groupfilter'] = '(&(cn=*)(Member=%{dn})(objectClass=group))'; //Alyse's edits
$conf['plugin']['authldap']['version'] = 3; //Alyse's edits
$conf['plugin']['authldap']['referrals'] = -1; //Alyse's edits
$conf['plugin']['authldap']['starttls'] = 1; //Alyse's edits
$conf['plugin']['authldap']['mapping']['name'] = 'displayname'; //Alyse's edits
$conf['plugin']['authldap']['mapping']['grps'] = array('memberof' => '/CN=(.+?),/i'); //Alyses edits
$conf['plugin']['authldap']['userscope'] = 'sub'; //Alyse's edits
$conf['plugin']['authldap']['groupscope'] = 'sub'; //Alyse's edits
$conf['plugin']['authldap']['userkey'] = 'uid';
$conf['plugin']['authldap']['groupkey'] = 'cn';
$conf['plugin']['authsplit']['debug'] = 1;`
The auth.php code is below as well. It is all under the protected function _openLDAP():
`if($this->getConf('version')) {
if(!@ldap_set_option(
$this->con, LDAP_OPT_PROTOCOL_VERSION,
$this->getConf('version')
)
) {
msg('Setting LDAP Protocol version '.$this->getConf('version').' failed', -1);
$this->_debug('LDAP version set: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__);
} else {
//use TLS (needs version 3)
if($this->getConf('starttls')) {
if(!@ldap_start_tls($this->con)) {
msg('Starting TLS failed', -1);
$this->_debug('LDAP TLS set: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__);
}
}
// needs version 3
if($this->getConf('referrals') > -1) {
if(!@ldap_set_option(
$this->con, LDAP_OPT_REFERRALS,
$this->getConf('referrals')
)
) {
msg('Setting LDAP referrals failed', -1);
$this->_debug('LDAP referal set: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__);
}`
UPDATE: I am more specifically getting a 0x80070102 error on my php handler. It says that C:\php\php-cgi.exe - The FastCGI process exceeded configuring activity timeout.
User contributions licensed under CC BY-SA 3.0