BASH 28
Apache2 php modules handling By micha on 11th November 2022 07:36:35 AM
  1. # Apache2 Version
  2. apache2 -v
  3.  
  4. # Show loaded modules
  5. apachectl -M
  6.  
  7. # Install php
  8. sudo apt-get install php7.4
  9.  
  10.  
  11. # Install all php7.x modules for a new Version f.e. from php7.2 to php7.4
  12. sudo apt install $(apt list --installed | grep php7.2- | cut -d'/' -f1 | sed -e 's/7.2/7.4/g')
  13.  
  14.  
  15. # disable / enable active version
  16. sudo a2dismod php7.2
  17. sudo a2enmod php7.4
  18.  
  19. # Restart apache2
  20. sudo systemctl apache2 restart

Paste is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.