r/BookStack • • Mar 17 '26

Composer dependencies error

I just ran through the upgrade steps to v26.03.1, I don't recall the bookstack version we were on previously, but we were on a version that needed the php and composer updates.

I ran those per the documentation, then ran the bookstack update steps.

After restarting I'm getting this message when I access the webpage:

Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.2.0". 

php version is showing 8.3.30

kb@kb:~$ php -v
PHP 8.3.30 (cli) (built: Feb 13 2026 15:59:12) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.30, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.30, Copyright (c), by Zend Technologies

This is running on ubuntu 24.04.4 LTS

Any suggestions to resolving that composer dependency message would be greatly appreciated.

5 Upvotes

5 comments sorted by

View all comments

Show parent comment

3

u/ssddanbrown Mar 17 '26

Okay, yeah, you seem to be collecting PHP versions like pokemon.

Probably best to ensure Apache is using a single expected version. Also might want to remove all others. This is how you could do that (Lines starting with # are comments):

# Disable old Apache PHP modules
sudo a2dismod php8.1
sudo a2dismod php8.2
# Enable PHP 8.3 module
sudo a2enmod php8.3
# Restart apache
sudo systemctl restart apache2.service


# Removing other PHP packages (optional)
sudo apt remove php8.1 php8.1-* php8.2 php8.2-* php8.4 php8.4-* libapache2-mod-php8.2 libapache2-mod-php8.1

1

u/FerrousBueller Mar 17 '26

That did it, we're back in.

Thank you for the quick support - we appreciate it

1

u/ssddanbrown Mar 17 '26

Good to hear! No worries, happy to help!