YunoHost-Apps / piwigo_ynh

Piwigo package for YunoHost
http://piwigo.org/
GNU General Public License v2.0
6 stars 4 forks source link

"LDAP extension not loaded" on login #100

Closed obrenckle closed 1 year ago

obrenckle commented 1 year ago

Describe the bug

After submitting my LDAP username and password when trying to access the app, I get an error page:

LDAP extension not loaded

Context

Steps to reproduce

Expected behavior

Log in the app

Logs

/var/log/nginx/maindomain.tld-error.log

/var/log/debug: slapd[1459]: slap_global_control: unrecognized control: 1.3.6.1.4.1.4203.666.5.16

bettyvschmartz commented 1 year ago

The issue seems to be that Piwigo is using PHP 8.0 but the php-ldap extension is only installed for PHP 7.4. You need to install the ldap extension for PHP 8.0;

sudo apt install php8.0-ldap

Restart your nginx and php services and everything should work.

Fix here is for the PHP extension to be a dependency upon installation of Piwigo.

-- bvs

plabuse commented 1 year ago

Hello, I'm not sure, modify on file _common.sh

pkg_dependencies="imagemagick php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-mysqli"

by

pkg_dependencies="imagemagick php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-mysqli"

French : Je vais essayer de tester.

bettyvschmartz commented 1 year ago

That looks like it would do the job.

Looking at the revision history of that file it doesn't look like the ldap extension has ever been a dependency even when YNH_PHP_VERSION=7.3 was set. So looks like the ldap extension wasn't installed even when using previous PHP versions.

-- bvs

obrenckle commented 1 year ago

Adding the php8.0-ldap package fixed it, thank you.

ericgaspar commented 1 year ago

Fixed with #103