Проблема с AdLdap2 на Laravel 5.5

Я получаю сообщение об ошибке при попытке использовать LDAP с Laravel 5.5

"Use of undefined constant LDAP_OPT_PROTOCOL_VERSION - assumed 'LDAP_OPT_PROTOCOL_VERSION'"

Тем не менее, я включил расширение PHP LDAP

$ php --ini |grep ldap

/etc/php.d/ldap.ini,

а также

$ cat /etc/php.d/ldap.ini
; Enable ldap extension module
extension=ldap.so

и php информация

$ php --info |grep ldap
/etc/php.d/ldap.ini,
Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp
ldap
ldap.max_links => Unlimited => Unlimited

я использую

$ php -v
PHP 7.1.10 (cli) (built: Sep 30 2017 10:30:04) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.10, Copyright (c) 1999-2017, by Zend Technologies

1

Решение

Вопрос решен.

Я установил библиотеки LDAP и перекомпилировал PHP с LDAP с нуля.

./ configure —other-extensions —with-ldap —enable-ldap

1

Другие решения

Для ldap на приусадебном боксе (laravel vagrant machine) или другом Ubuntu с php-fpm и nginx …

apt-get install php5.6-ldap
apt-get install php7.0-ldap
apt-get install php7.1-ldap
apt-get install php7.2-ldap

это устанавливает и настраивает все, что вам нужно.

Убедись, что ты shutdown -h now и перезапустите ваш ящик для php-fpm и nginx, чтобы увидеть обновления.

0

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector