This is my Action
public function loginAction()
{
$request= $this->getRequest();
if($request->isPost())
{
$username= $request->getPost('email');
$password= $request->getPost('password');
$auth = new AuthenticationService();
$adapter = new AuthAdapter(
array('server1'=>array(
'host' => '192.168.1.4',
'useStartTls' => false,
'useSsl' => false,
'accountDomainName' => 'coasting',
'accountDomainNameShort' => 'DOMAIN',
'accountCanonicalForm' => 3,
'accountFilterFormat' => '(&(objectClass=user)(sAMAccountName=%s))',
'baseDn' => 'CN=Users,DC=domain,DC=local',
'bindRequiresDn' => false,
'optReferrals' => false
)),
$username,
$password
);
$result = $auth->authenticate($adapter);
print_r($result);
}
}
after starting this action, the following error displays "0x7002: LDAP extension not loaded",
/var/www/coasting/vendor/zendframework/zendframework/library/Zend/Authentication/Adapter/Ldap.php(140): Zend \ Ldap \ Ldap → __ construct ()
/var/www/coasting/vendor/zendframework/zendframework/library/Zend/Authentication/Adapter/Ldap.php(205): Zend \ Authentication \ Adapter \ Ldap-> getLdap ()
/var/www/coasting/vendor/zendframework/zendframework/library/Zend/Authentication/AuthenticationService.php(110): Zend \ Authentication \ Adapter \ Ldap-> authenticate ()
How can I solve this error. If any other settings?
source
share