Skip to content

how to set the protocol version #4

@damko

Description

@damko

I think this example should be added to the README

If you need to set a protocol version to connect to your ldap server you should do this:

    $params = array(
        'hostname'      => 'example.com',
        'base_dn'       => 'dc=example,dc=com',
        'port' => 389,
        'bind_dn' => 'cn=admin,dc=example,dc=com',
        'bind_password' => 'secretpassword',
        'options' => array(LDAP_OPT_PROTOCOL_VERSION => 3),
    );

    $manager = new Manager($params, new Driver());

Do the same for any of the options listed here http://php.net/manual/it/function.ldap-set-option.php

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions