Skip to content

Instantly share code, notes, and snippets.

@frankIT
Last active January 22, 2024 11:05
Show Gist options
  • Save frankIT/023029f21abb1e505f7ce105a5b17f99 to your computer and use it in GitHub Desktop.
Save frankIT/023029f21abb1e505f7ce105a5b17f99 to your computer and use it in GitHub Desktop.
coexistence of multiple php versions on debian stretch
#!/bin/bash
# https://deb.sury.org/
VERSION=$1
# unmount all php apache modules
for version in $(ls /etc/php); do
sudo a2dismod php$version
done
# mount the needed apache php module
sudo a2enmod php"$VERSION"
# restart apache
sudo service apache2 restart
# fix system symlinks
sudo update-alternatives --config php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment