Dallas Smetter
asked on
How to format an array to pass as an option to adLDAP
Using the adLDAP code, with documentation
that says:
My problem is that I don't know how to construct the array in the proper format to become the array known as $options.
Here's what I've tried, and it fails.
-----
I am trying like:
------
I should not that If I hard code the values into the adLdap.php, it works just fine. But I need to ability to use more than one setup, so I need to figure out how to pass these values in to override the defaults.
Thank you in advance!
that says:
You can alternatively override the configuration when the class is called by specifying an array with the options.
Called like $adldap = new adLDAP($options); Where $options is an array with one or more of the following keys
account_suffix base_dn domain_controllers admin_username admin_password real_primarygroup use_ssl use_tls recursive_groups ad_port sso
See the 'examples' and 'connecting and disconnecting' section for more information
My problem is that I don't know how to construct the array in the proper format to become the array known as $options.
Here's what I've tried, and it fails.
-----
I am trying like:
include ('mk16/lib/adLDAP/src/adLDAP.php');
$options = array(
"account_suffix" => "@esc1.net",
"base_dn" => "DC=esc1,DC=net",
"domain_controllers" => array("64.209.45.117"),
"admin_username" => "username",
"admin_password" => "mypassword",
"use_ssl" => true,
);
$adldap = new adLDAP($options);
------
I should not that If I hard code the values into the adLdap.php, it works just fine. But I need to ability to use more than one setup, so I need to figure out how to pass these values in to override the defaults.
Thank you in advance!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
http://adldap.sourceforge.net/wiki/doku.php?id=documentation