Hello,
I installed Nextcloud 27 on my server. In the Security & setup warnings
the following warnings appear.
When I check the php-version with php -v on the server. I get the following response
PHP 8.2.8 (cli) (built: Jul 8 2023 07:10:21) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.8, Copyright (c) Zend Technologies
with Zend OPcache v8.2.8, Copyright (c), by Zend Technologies
I checked several config and ini files but I can not find the failure.
The server is running under “Ubuntu 22.04.2 LTS (GNU/Linux 5.15.107-2-pve x86_64)” in an Proxmox environment .
Does someone of you have an idea?
Thank you in advance
Ulrich
When you check with php -v in linux command line, it reports PHP version configured for the command line , which can differ from the one that is used by apache/php-fpm used for serving the web content.
The easist to test where your config files point to for the apache/php-fpm config is to create a simple info.php file in your web directory with your Nextcloud installation, the content of the info.php file is the simple one line : <? phpinfo(); ?>
Then go to your browsers, open this info.php file and check the sections for the loaded configuration file / other ini files as per the example screenshot:
Then you need to go and fix your PHP config, so that the apache uses the correct one.
1 Like
ernolf
July 14, 2023, 8:36am
3
If you are using apache2 (you did not provide that information!)
Invoke these commands:
apachectl -tD DUMP_INCLUDES | sed -n '/php.*conf/ s#.*/\([^/]*\)\.conf#\1#p'
dpkg -l | awk '/^ii.*php/ {print $2}'
and:
update-alternatives --get-selections | grep -E "ph(ar|p)"
and if that does not help you, post the echoes here.
Much luck
1 Like
Hello Leo,
thank you for your help. It brought me to the right solution. Some additional information how I solved it.
I create the info.php file as followed:
sudo nano /var/www/html/info.php
The following 3 lines in the file
<?php
phpinfo();
?>
In the web browser I called "ip-address/info.php
Here I got all inforation on the php
I disabled the php8.0 by
sudo a2dismod php8.0
I disabled the php8.2 by
sudo a2dismod php8.2
restarted the apache2
systemctl restart apache2
enabled the php8.2
sudo a2enmod php8.2
restarted the apache2 again
systemctl restart apache2
Done
Thank you again for your support.
Ulrich
1 Like
Hello ernolf,
thanks for your help.
I could solve the problem in the meantime. (details see below)
Best regards
Ulrich
1 Like
I use nextcloud, pihole and zabbix system on Debian 11 (AMD64), and I had to do this additional step to the above mentioned steps:
sudo a2enconf php8.2-fpm
before I installed it via sudo apt php-fpm
then systemctl restart apache2
This solved the php8.2 change for me.