In case of error, here are some additional steps:
$ setsebool -P httpd_can_network_connect 1
With LDAP, if your users are all into the same OU, you'd use a common pattern:
uid=%s,ou=people,dc=company,dc=com
With Microsoft Active Directory, you would associate a user with its LDAP full path into the DB table users:
CN=BALET benjamin,OU=Users,DC=COMMON,DC=AD,DC=COMPANY,DC=FR