Closed rbukovansky closed 7 years ago
That is strange, seems like an issue with the way composer is configured. What version of PHP and Grav are you using?
PHP 7.0.16 (Fedora 25) Grav 1.1.17
Ok, I'm using php 5.5 but this part of the code was just copied from grav-plugin-login so if that is php7 compatible this should be too. Try rebuilding the composer files with:
php /path/to/grav_root/bin/composer.phar update
Run this from the loginldap plugin directory.
OK. I got this from that command:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 1 update, 0 removals
- Installing paragonie/random_compat (v1.4.1) Downloading: 100%
- Updating birke/rememberme (1.0.4 => 1.0.5) Downloading: 100%
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
Writing lock file
Generating autoload files
and this error after reload of page:
Whoops \ Exception \ ErrorException (E_WARNING)
ldap_search(): Search: Protocol error
Google is not showing much for "ldap_search() Protocol error". What LDAP server are you using? If you haven't already, it's probably worth verifying a simple example like this works for you:
Also, can you share your loginldap.yaml minus anything sensitive.
OK. I just solved this.
user_filter: '(&(objectClass=user)(sAMAccountName=%s))'
to this:
user_filter: '(&(objectClass=posixAccount)(uid=%s))'
and voila!
Thanks.
Ok great, I ran composer update on my end and commited, hopefully that fixes it.
When my user enters credentials on login page, I'm getting this error:
@markleary Any idea, what's going on, please? Thanks.