connect to that one instead of the ldap_server. That way we can read from the fast read-only replicas and
write to a slower master.
* Only connect and bind to the ldap server if we haven't done that before.
* Remove previous change. It was causing problems
* In the user test page ignore comments from the auth.request file
+* Add a new config directive, ldap_write_server. If it is set then when we update the directory we try to
+ connect to that one instead of the ldap_server. That way we can read from the fast read-only replicas and
+ write to a slower master.
Ver 1.55:
* Update the FAQ about missing attributes from the user/group edit pages and add a few comments
in the configuration files
nas3_community: public
ldap_server: ldap.%{general_domain}
+#
+# There are many cases where we have a small write master and
+# a lot of fast read only replicas. If that is the case uncomment
+# ldap_write_server and point it to the write master. It will be
+# used only when writing to the directory, not when reading
+#
+#ldap_write_server: master.%{general_domain}
ldap_base: dc=company,dc=com
ldap_binddn: cn=Directory Manager
ldap_bindpw: XXXXXXX
<?php
require_once('../lib/ldap/functions.php3');
- $ds = @ldap_connect($config[ldap_server]);
+ if ($config[ldap_write_server])
+ $ds = @ldap_connect($config[ldap_write_server]);
+ else
+ $ds = @ldap_connect($config[ldap_server]);
if ($ds){
$r = @da_ldap_bind($ds,$config);
if ($r){
<?php
require_once('../lib/ldap/functions.php3');
- $ds = @ldap_connect($config[ldap_server]);
+ if ($config[ldap_write_server])
+ $ds = @ldap_connect($config[ldap_write_server]);
+ else
+ $ds = @ldap_connect($config[ldap_server]);
if ($ds){
$r = @da_ldap_bind($ds,$config);
if ($r){
<?php
require_once('../lib/ldap/functions.php3');
- $ds = @ldap_connect($config[ldap_server]);
+ if ($config[ldap_write_server])
+ $ds = @ldap_connect($config[ldap_write_server]);
+ else
+ $ds = @ldap_connect($config[ldap_server]);
if ($ds){
$r = @da_ldap_bind($ds,$config);
if ($r){
<?php
require_once('../lib/ldap/functions.php3');
- $ds = @ldap_connect($config[ldap_server]);
+ if ($config[ldap_write_server])
+ $ds = @ldap_connect($config[ldap_write_server]);
+ else
+ $ds = @ldap_connect($config[ldap_server]);
if ($ds){
$r = @da_ldap_bind($ds,$config);
if ($r){
$regular_profile_attr = $config[ldap_regular_profile_attr];
$ds=@ldap_connect("$config[ldap_server]"); // must be a valid ldap server!
if ($ds) {
- $r=@da_ldap_bind($ds,$config);
+ $r=@da_ldap_bind($ds,$config);
$sr=@ldap_search($ds,"$config[ldap_default_dn]", 'objectclass=*');
if ($info = @ldap_get_entries($ds, $sr)){
$dn = $info[0]['dn'];
<?php
require_once('../lib/ldap/functions.php3');
-$ds = @ldap_connect($config[ldap_server]);
+if ($config[ldap_write_server])
+ $ds = @ldap_connect($config[ldap_write_server]);
+else
+ $ds = @ldap_connect($config[ldap_server]);
if ($ds){
$r = @da_ldap_bind($ds,$config);
if ($r){