LDAP configuration for Mac server

ldapmac-osxopenldap

We just migrated our php webapps to a new web server (Mac OS X 10.9.5). We are having trouble with ldap logins to the webapps. We are able to successfully connect to a remote ldap server, but when we try and ldap_bind(), it is unable to bind. We haven't changed the code from what worked on the old webserver, so I think it has something to do with the openLDAP configuration on our new server. I compared /etc/openldap/ldap.conf on the old and new servers, and I saw that the TLS_REQCERT attribute was set to demand on the new server, but it was set to never on the old server.

I was sure this was the problem, since we didn't have any certs installed to the proper directory in /etc/openldap/certs, but for a sanity check, I changed demand to never, restarted the mac, and the problem persisted.

Any thoughts as to what I can do to troubleshoot?

Thanks.

Best Answer

Well after a bit of troubleshooting, I found out that there was a conflicting ldap.config file in /opt/local/etc/openldap/. I guess that was added when I used macports to install php53-ldap. I ended up symlinking /etc/openldap/ldap.conf to the /opt/local/etc/openldap/ldap.conf file and it worked.