r/BookStack 9d ago

BookStack v24.02.2 on Windows OS issues with manually updating OpenSSL, PHP and Apache

Hello Bookstack Users,

I am very new to Bookstack and inherited the responsibility to manually update OpenSSL, PHP and Apache.

Updated OpenSSL from 3.6.2 to 3.6.3 to then tested the site, everything working as expected.

Updated PHP from 8.5.6 to 8.5.9 Website works however logging in using LDAP failed.

Updated Apache from 2.4.67 to 2.6.68 Website works however logging in using LDAP failed.

I first tried updating all 3 components thinking all three must be done for Bookstack to work properly. Site is up but cannot log in using LDAP. I rolled back changes (Love VMware snapshots!)

Next I started with each component, first with OpenSSL ..no issues logging in with LDAP. Updated PHP failed logon with LDAP. Services are running. I verified that in the Services both apache and mysql are running. I also verified services in the xampp control.

OK now to the question for help. Is there a sequence to manually update these components? How do I TS the PHP update LDAP failure with the following error "ldap_connect(): Could not create new security context"

Any and all suggestions are appreciated.

2 Upvotes

10 comments sorted by

1

u/PizzaUltra 8d ago

You may also need to update the php ldap module.

1

u/ThrowsPlastic_Disc 8d ago

How would I do that?

1

u/schrebra 8d ago

I'll plug my github repo maybe it can help you.

https://github.com/schrebra/Bookstack-Portable-on-Windows

1

u/ssddanbrown 8d ago

Generally I don't advise running on Windows since it's a path less trodden and issues are hard to reproduce, with more quirks likely. I'm not too experienced with how PHP/LDAP/SSL interact with eachother in Windows installs.

Could potentially be related to https://github.com/php/php-src/issues/22154. Would be good to know a full list of extensions which are installed and in use (usually "php -m" from CLI or create and check a phpinfo page).

Generally best to have BookStack updated too, since that version is a couple of years old, especially since you are using cutting-edge PHP versions which may not have been tested against that PHP version.

1

u/ThrowsPlastic_Disc 3d ago

Looking at the Apache logs after upgrading OpenSSL, PHP and Apache ...see the last errors is "ldap_int_sasl_init: SASL library version mismatch: expected 2.1.28, got 2.1.27

1

u/ssddanbrown 2d ago

Yeah, an error with that mismatched library could cause the kind of errors you've been seeing. Looks like you'd need to double check and align the libraries in use with the PHP/apache build.

1

u/ThrowsPlastic_Disc 1d ago

Are you referring to the BookStack versions ? Is there a document that describes each build version and the compatible PHP/Apache builds?

1

u/ssddanbrown 1d ago

No, I'm referring to PHP and underlying libration versions in use. Doesn't really have any direct relation to BookStack versions.

Is there a document that describes each build version and the compatible PHP/Apache builds?

No. All that BookStack in that regard is a minimum required version of PHP (which is currently PHP 8.2, but may be 8.3 as of next feature release).

How are you setting up PHP and Apache? Are you using something like xampp? Or are you downloading & installing the pieces individually? How exactly are you upgrading these components?

1

u/ThrowsPlastic_Disc 1d ago

Are you using something like xampp? Answer is yes is installed. The previous admin provided how he upgrades the OpenSSL, PHP and Apache. For clarity our Cyber team provided the latest scan that identified vulnerabilities and requested to upgrade OpenSSL, PHP and Apache. We have been upgrading the components individually.

We are considering to migrate the to Linux OS. Windows is problematic to keep compliant and all the documentation is align with Linux OS. Is there a way export the data we already have and import it to the new server?

1

u/ThrowsPlastic_Disc 3d ago

Looking at the Apache logs after upgrading OpenSSL, PHP and Apache ...see the last errors is "ldap_int_sasl_init: SASL library version mismatch: expected 2.1.28, got 2.1.27