You are here
Hello
I am trying to use the bookstack appliance (turnkey-bookstack-17.2-bullseye-amd64 to be precise) in the context of a multi user setup. To this effect we would like to use our AD-based LDAP servers to authenticate against.
To some of my surprise the appliance does not come with the necessary PHP LDAP extensions. After a bit of searching I eventually managed to get it stop complaining about PHP-LDAP not being installed by doing an
apt-get install php8.1-ldap
Still not much progress - I can't seem to be able to lookup to LDAP server. Checking the logs I see
Apr 18 17:44:10 bs-dn-01 systemd[1]: Starting The Apache HTTP Server...
Apr 18 17:44:10 bs-dn-01 systemd[1]: Started The Apache HTTP Server.
Apr 18 18:09:00 bs-dn-01 systemd[1]: Starting Clean php session files...
Apr 18 18:09:00 bs-dn-01 sessionclean[4985]: PHP Warning: PHP Startup: Unable to load dynamic library 'php_ldap.so' (tried: /usr/lib/php/20210902/php_ldap.so (/usr/lib/php/20210902/php_ldap.so: cannot open shared object file: No such file or directory), /usr/lib/php/20210902/php_ldap.so.so (/usr/lib/php/20210902/php_ldap.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
FWIW I don't have a php_ldap.so file on the machine.
So it would seem I still don't have the proper libraries installed / configured correctly.
Is the use of LDAP not a reasonable use case so as to have it at least pre-configured "out of the box" ?
As an aside I entered the APP_DEBUG=true directive into the bookstack .env configuration but not quite sure to know where the resulting output is directed.
Any suggestion as of how to have it working most appreciated.
Hi Alexandre, welcome to TurnKey
Seems like a bug?!
I don't have a proper system handy to test on, but I did just download the php8.1-ldap package (specifically php8.1-ldap_8.1.18-1+0~20230414.39+debian11~1.gbpad774c_amd64.deb) and unpacked it. The so (shared object) file is called 'ldap.so'!? Not 'php_ldap.so' as per your error message!?
Strange thing is that the config file in the package (ldap.ini) has 'extension=ldap.so' (again not 'php_ldap.so' as per your error). The packages are fairly new, but I imagine that we have the same package (mine was published 14th April), so I don't understand how it can be!?
I doubt it will make any difference, but you could try forcing a reinstall of the package:
Assuming that doesn't make any difference, please check he following:
That will help locate the config file that includes the wrong path and hopefully confirm my suspicion. Then to double check that the name is the same as I found:
If the file doesn't exist, it will give an error.
Assuming that the file exists, and you find the file that notes the file as php_ldap.so, changing that to be ldap.so should fix it. We should lodge a bug with upstream too (assuming I'm right).
If you're still struggling, please share the output of the commands I noted above. Perhaps also re-run the grep command with a '-R' (instead of the '-r' - lower case is recursive, upper case is recursive, but follow symlinks). Also perhaps give me the full contents of the directory (i.e. rerun the command without the ldap.so on the end).
If you confirm the issue, I'll report it upstream. It certainly shouldn't be this hard...
Add new comment