I upgraded the php version on my Apache server running on Debian (buster) from 7.3 to 8.1. Due to an older Nextcloud installation I had to downgrade to php7.4. The downgrade worked well following instructions like this, but the server is still reporting it is on the previous version 8.1.13. I placed a simple phpversion()
file to check out the server version and the Nextcloud installation is complaining of the incorrect version. Is this a cache issue or some configuration file which has to be modified manually?
- CLI:
php -v
returns PHP 7.4.33 (cli) (built: Nov 8 2022 11:35:02) ( NTS )
php -c /etc/php/apache2/php.ini -v
reads PHP 7.4.33
update-alternatives --config php
shows * 2 /usr/bin/php7.4 74 manual mode
- Added php7.4 module via
sudo a2enmod php7.4
- Removed all other php modules via
sudo a2dismod phpX.Y
/etc/apache2/mods-enabled/ looks like this:
access_compat.load autoindex.load mime.load reqtimeout.load alias.conf deflate.conf mpm_prefork.conf rewrite.load alias.load deflate.load mpm_prefork.load setenvif.conf auth_basic.load dir.conf negotiation.conf setenvif.load authn_core.load dir.load negotiation.load socache_shmcb.load authn_file.load env.load php7.4.conf ssl.conf authnz_external.load filter.load php7.4.load ssl.load authz_core.load headers.load proxy.conf status.conf authz_host.load http2.conf proxy_fcgi.load status.load authz_user.load http2.load proxy.load unique_id.load autoindex.conf mime.conf reqtimeout.conf
phpinfo readout can be found here