Alexandre Takacs's picture


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 '' (tried: /usr/lib/php/20210902/ (/usr/lib/php/20210902/ cannot open shared object file: No such file or directory), /usr/lib/php/20210902/ (/usr/lib/php/20210902/ cannot open shared object file: No such file or directory)) in Unknown on line 0

FWIW I don't have a 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.

Jeremy Davis's picture

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 ''!? Not '' as per your error message!?

Strange thing is that the config file in the package (ldap.ini) has '' (again not '' 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:

apt update
apt install --reinstall php8.1-ldap

Assuming that doesn't make any difference, please check he following:

grep -R /etc/php/8.1

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:

ls -l /usr/lib/php/20210902/

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, changing that to be 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 on the end).

If you confirm the issue, I'll report it upstream. It certainly shouldn't be this hard...

Add new comment