Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.12.3 available

The official documentation can be found on https://wiki.ocsinventory-ng.org. Read it before asking your question.

LDAP stop working after an upgrade

Hello everyone,

I just got a LDAP problem after upgrading our OCS server, i can't connect to it using my LDAP account.

OS version : centos 6.8 (2.6.32-642.11.1.el6.x86_64)

PHP version : 5.6.31

OCS server : 2.3.1

Agent version : still 2.1.1

Error log :

[Mon Aug 21 11:29:11 2017] [error] [client X.X.X.X] PHP Warning:  ldap_connect(): Could not create session handle: Bad parameter to an ldap routine in /usr/share/ocsinventory-reports/ocsreports/backend/AUTH/methode/ldap.php on line 124, referer: https://par-abv-ocs/ocsreports/
[Mon Aug 21 11:29:11 2017] [error] [client X.X.X.X] PHP Warning:  ldap_set_option(): supplied argument is not a valid ldap link resource in /usr/share/ocsinventory-reports/ocsreports/backend/AUTH/methode/ldap.php on line 127, referer: https://par-abv-ocs/ocsreports/
[Mon Aug 21 11:29:11 2017] [error] [client X.X.X.X] PHP Warning:  ldap_set_option(): supplied argument is not a valid ldap link resource in /usr/share/ocsinventory-reports/ocsreports/backend/AUTH/methode/ldap.php on line 128, referer: https://par-abv-ocs/ocsreports/
[Mon Aug 21 11:29:11 2017] [error] [client X.X.X.X] PHP Warning:  ldap_bind() expects parameter 1 to be resource, boolean given in /usr/share/ocsinventory-reports/ocsreports/backend/AUTH/methode/ldap.php on line 130, referer: https://par-abv-ocs/ocsreports/
[Mon Aug 21 11:29:11 2017] [error] [client X.X.X.X] PHP Warning:  ldap_search(): supplied argument is not a valid ldap link resource in /usr/share/ocsinventory-reports/ocsreports/backend/AUTH/methode/ldap.php on line 76, referer: https://par-abv-ocs/ocsreports/
[Mon Aug 21 11:29:11 2017] [error] [client X.X.X.X] PHP Warning:  ldap_count_entries() expects parameter 1 to be resource, boolean given in /usr/share/ocsinventory-reports/ocsreports/backend/AUTH/methode/ldap.php on line 77, referer: https://par-abv-ocs/ocsreports/
[Mon Aug 21 11:29:11 2017] [error] [client X.X.X.X] PHP Warning:  ldap_get_entries() expects parameter 1 to be resource, boolean given in /usr/share/ocsinventory-reports/ocsreports/backend/AUTH/methode/ldap.php on line 78, referer: https://par-abv-ocs/ocsreports/
[Mon Aug 21 11:29:11 2017] [error] [client X.X.X.X] PHP Warning:  ldap_close() expects parameter 1 to be resource, boolean given in /usr/share/ocsinventory-reports/ocsreports/backend/AUTH/methode/ldap.php on line 79, referer: https://par-abv-ocs/ocsreports/

Package installed :

php56w-cli-5.6.31-1.w6.x86_64
php56w-opcache-5.6.31-1.w6.x86_64
php56w-ldap-5.6.31-1.w6.x86_64
php56w-common-5.6.31-1.w6.x86_64
php56w-pdo-5.6.31-1.w6.x86_64
php56w-5.6.31-1.w6.x86_64
php56w-mbstring-5.6.31-1.w6.x86_64
php56w-gd-5.6.31-1.w6.x86_64
php56w-mysql-5.6.31-1.w6.x86_64
php56w-soap-5.6.31-1.w6.x86_64
openldap-clients-2.4.40-16.el6.x86_64
openldap-2.4.40-16.el6.x86_64
apr-util-ldap-1.3.9-3.el6_0.1.x86_64
in OCS Inventory NG server for Unix by (160 points)

2 Answers

0 votes
Stop using bad repository. RPM must be installed from the remi's repository only and not from other.

https://rpms.remirepo.net/wizard/
by (22k points)
0 votes
Hello,

I installed remi repo and did an update :

php-common-5.6.31-1.el6.remi.x86_64
php-ldap-5.6.31-1.el6.remi.x86_64
php-xml-5.6.31-1.el6.remi.x86_64
php-pecl-zip-1.15.1-1.el6.remi.5.6.x86_64
php-cli-5.6.31-1.el6.remi.x86_64
php-gd-5.6.31-1.el6.remi.x86_64
php-5.6.31-1.el6.remi.x86_64
php-soap-5.6.31-1.el6.remi.x86_64
php-opcache-5.6.31-1.el6.remi.x86_64
php-pecl-jsonc-1.3.10-2.el6.remi.5.6.x86_64
php-pdo-5.6.31-1.el6.remi.x86_64
php-mysqlnd-5.6.31-1.el6.remi.x86_64
php-mbstring-5.6.31-1.el6.remi.x86_64

But still have the same problem .....

[Fri Aug 25 14:40:32 2017] [error] [client] PHP Warning:  ldap_connect(): Could not create session handle: Bad parameter to an ldap routine in /usr/share/ocsinventory-reports/ocsreports/backend/AUTH/methode/ldap.php on line 124, referer: https://par-abv-ocs/ocsreports/
[Fri Aug 25 14:40:32 2017] [error] [client] PHP Warning:  ldap_set_option(): supplied argument is not a valid ldap link resource in /usr/share/ocsinventory-reports/ocsreports/backend/AUTH/methode/ldap.php on line 127, referer: https://par-abv-ocs/ocsreports/
[Fri Aug 25 14:40:32 2017] [error] [client] PHP Warning:  ldap_set_option(): supplied argument is not a valid ldap link resource in /usr/share/ocsinventory-reports/ocsreports/backend/AUTH/methode/ldap.php on line 128, referer: https://par-abv-ocs/ocsreports/
[Fri Aug 25 14:40:32 2017] [error] [client] PHP Warning:  ldap_bind() expects parameter 1 to be resource, boolean given in /usr/share/ocsinventory-reports/ocsreports/backend/AUTH/methode/ldap.php on line 130, referer: https://par-abv-ocs/ocsreports/
[Fri Aug 25 14:40:32 2017] [error] [client] PHP Warning:  ldap_search(): supplied argument is not a valid ldap link resource in /usr/share/ocsinventory-reports/ocsreports/backend/AUTH/methode/ldap.php on line 76, referer: https://par-abv-ocs/ocsreports/
[Fri Aug 25 14:40:32 2017] [error] [client] PHP Warning:  ldap_count_entries() expects parameter 1 to be resource, boolean given in /usr/share/ocsinventory-reports/ocsreports/backend/AUTH/methode/ldap.php on line 77, referer: https://xxxxxxxxx/ocsreports/
[Fri Aug 25 14:40:32 2017] [error] [client] PHP Warning:  ldap_get_entries() expects parameter 1 to be resource, boolean given in /usr/share/ocsinventory-reports/ocsreports/backend/AUTH/methode/ldap.php on line 78, referer: https://par-abv-ocs/ocsreports/
[Fri Aug 25 14:40:32 2017] [error] [client] PHP Warning:  ldap_close() expects parameter 1 to be resource, boolean given in /usr/share/ocsinventory-reports/ocsreports/backend/AUTH/methode/ldap.php on line 79, referer: https://par-abv-ocs/ocsreports/
by (160 points)
 
Powered by Question2Answer
...