You are not logged in.

#1 2022-09-22 14:37:04

janoschz
Member
Registered: 2015-10-06
Posts: 19

[SOLVED] The package php says it provides php-ldap but it doesn't

I installed the php package in order to start working on some small web interface. I need the LDAP extension for authentication - but when I tried to install directorytree/ldaprecord with composer it gives me the error that this extension is missing. Indeed when I try to call the function ldap_connect I get:

PHP Fatal error:  Uncaught Error: Call to undefined function ldap_connect()

But interestingly:

$ pacman -Qi php                                                                                                                                                                                                 ✓
Name            : php
Version         : 8.1.10-1
Description     : A general-purpose scripting language that is especially suited to web development
Architecture    : x86_64
URL             : https://www.php.net/
Licenses        : PHP
Groups          : None
Provides        : php-interpreter=8.1  php-ldap=8.1.10
Depends On      : libxml2  curl  libzip  pcre2  argon2  oniguruma  db  gdbm
Optional Deps   : None
Required By     : composer  php-gd  php-imap  php-intl  php-pgsql  php-sqlite  xdebug
Optional For    : None
Conflicts With  : php-ldap
Replaces        : php-ldap
Installed Size  : 24.04 MiB
Packager        : Pierre Schmitz <pierre@archlinux.de>
Build Date      : Sat 03 Sep 2022 06:38:10 AM CEST
Install Date    : Thu 22 Sep 2022 03:59:24 PM CEST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

There it is stated:

Provides        : php-interpreter=8.1  php-ldap=8.1.10

Why is there no ldap even though the package states it provides it? What can I do to get ldap working with PHP? Or do you all compile PHP yourself to get those extensions working that you need?

Thanks for any help!

Last edited by janoschz (2022-09-22 14:53:25)

Offline

#2 2022-09-22 14:42:31

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,665

Re: [SOLVED] The package php says it provides php-ldap but it doesn't

The module is there: usr/lib/php/modules/ldap.so are you loading it in your /etc/php/php.ini?

https://wiki.archlinux.org/title/PHP#Configuration
https://wiki.archlinux.org/title/PHP#Extensions

Last edited by V1del (2022-09-22 14:43:47)

Offline

#3 2022-09-22 14:52:47

janoschz
Member
Registered: 2015-10-06
Posts: 19

Re: [SOLVED] The package php says it provides php-ldap but it doesn't

Oh man, I am sorry! Of course... Thank you!

Offline

Board footer

Powered by FluxBB