Last active
January 22, 2024 11:05
-
-
Save frankIT/023029f21abb1e505f7ce105a5b17f99 to your computer and use it in GitHub Desktop.
coexistence of multiple php versions on debian stretch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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