Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to a member function connect() on null #141

Open
porchys opened this issue Apr 27, 2018 · 4 comments
Open

Call to a member function connect() on null #141

porchys opened this issue Apr 27, 2018 · 4 comments

Comments

@porchys
Copy link

porchys commented Apr 27, 2018

Call to a member function connect() on null

@porchys
Copy link
Author

porchys commented Apr 27, 2018

public function connect()
{

    // Select a random domain controller
    $domainController = $this->domainControllers[array_rand($this->domainControllers)];
       
    // Get the LDAP port
    $port = $this->getPort(); 
    // Create the LDAP connection
     
    $this->ldapConnection->connect($domainController, $port);
    // Set the LDAP options
     
    $this->ldapConnection->setOption(LDAP_OPT_PROTOCOL_VERSION, 3);
    $this->ldapConnection->setOption(LDAP_OPT_REFERRALS, $this->followReferrals);
    // Authenticate to the server
    
    return $this->authenticate($this->getAdminUsername(), $this->getAdminPassword(), true);
}

@porchys
Copy link
Author

porchys commented Apr 27, 2018

error is for this code $this->ldapConnection->connect($domainController, $port);

@porchys
Copy link
Author

porchys commented Apr 27, 2018

can you help me get out of this error.

@porchys
Copy link
Author

porchys commented Apr 27, 2018

above code is of file Adldap.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant