Debian/Ubuntu will take care that the upgraded versions are compatible. Most of the times, the upgraded versions are security related.
I have the package apticron installed, that sends me an email when upgradable versions of some packages are available. I get several emails a week, and I keep all my servers up to date.
If you have not done changes to http2.conf, you can install the new version with no risk. If you did change it, you may have to redo the changes to the new version. “apt upgrade” will give you some hints to check the differences.
I cannot remember if i have made any changes to be honest. i went for NO, the result is:
The following NEW packages will be installed:
libbrotli1
The following packages have been kept back:
libapache2-mod-php7.4 php7.4-cli php7.4-common php7.4-json php7.4-opcache
php7.4-readline
The following packages will be upgraded:
apache2 apache2-bin apache2-data apache2-utils libaprutil1
libaprutil1-dbd-sqlite3 libaprutil1-ldap
7 upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
After this i tried to install php7.4 FRM again.
sudo apt install php7.4-fpm still gives me:
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php7.4-fpm : Depends: php7.4-common (= 7.4.7-1+ubuntu18.04.1+deb.sury.org+1) but 7.4.6-1+ubuntu18.04.1+deb.sury.org+1 is to be installed
E: Unable to correct problems, you have held broken packages.
When i do apt-get install php7.4-fpm it now shows:
php7.4-fpm is already the newest version (7.4.8-1+ubuntu18.04.1+deb.sury.org+3).
0 upgraded, 0 newly installed, 0 to remove and 45 not upgraded.
When i do a2enmod php7.4
Considering dependency mpm_prefork for php7.4:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php7.4:
Module php7.4 already enabled
So it looks like 7.4 is finally installed correcty.
PHP -v is also showing PHP 7.4.8 (but it already did that)
This is a little weird:
a2dismod php7.3
ERROR: Module php7.3 does not exist!
a2dismod php7.2
ERROR: Module php7.2 does not exist!
Nextcloud shows me that PHP 7.2.31 is installed.
What should i do next? Like i said it finally looks like PHP7.4 is fully installed.
I have added the line and ran systemctl restart apache2. But Nextcloud is still telling me i am running PHP 7.2.31.
I have also copied nextcloud.conf from /etc/php/7.2/fpm/pool.d/ to /etc/php/7.4/fpm/pool.d/.
and changed : listen /run/php7.2-fpm.nextcloud.sock to /run/php7.4-fpm.nextcloud.sock
If your nextcloud still runs on php7.2, somewhere in the chain there is a missing link. Is the /etc/apache2/sites-available/000-default.conf file really the one that serves nextcloud? Are there other files in /etc/apache2/sites-available/ ? What files are in /etc/apache2/sites-enables ? There should be only symlinks to the actual configuration files, but in case of a bad setup there might be real files that take priority.
Check that the socket /run/php/php7.4-fpm.sock indeed exists. Make sure your apache config is using it.
In the directory /etc/apache2/sites-enabled there is only one file: cloud.DOMAIN.nl.conf
When i look at that file i again see this:
SetHandler "proxy:unix:/run/php/php7.2-fpm.nextcloud…
when i change this to 7.4 and restart apache2 en php7.4-fpm… Nextcloud finally tells me i am using PHP 7.4.8!!
Many many thanks to you @eehmke and of course everybody else!
I am having one tiny problem now, i have to set the maximum memory to 256MB according to my Nextcloud.
I have changed /etc/php/7.4/apache2/php.ini and the line memory_limit but that is not working.
I also tried this command:
sudo snap set nextcloud php.memory-limit=512M
but also didn’t work.
Could you tell me where to change this value?
And a related update question, i am running Ubuntu 18.04.1 LTS shouldn’t i at some point upgrade to a newer LTS version? Is that also possible or does that mean reinstalling the whole shabang? Like a Windows 7 to Windows 10 clean install?
Great, nice to know it works now! You have to do one final step to clean your config: compare the files in sites-available and sites-enabled. Make sure the content of the file in sites-enabled is also in sites-available. Then DELETE the file in sites-enabled! Next you run this command:
sudo a2ensite cloud.DOMAIN.nl
(put in your file name without the .conf extension). This will create a symlink in sites-enabled. All future updates have to go to sites-available. Restart apache.
You can put those definitions into your fpm config file in /etc/php/7.4/fpm/pool.d/
like:
php_admin_value[memory_limit] = 512M
I think upgrade should be no problem. But make sure you backup all relevant data, in case something goes wrong (which I would not expect). Backup is always a good idea. It should include:
config files in /etc
nextcloud installation in /var/www/nextcloud
data directory (which should not be in /var/www/nextcloud)
dump of the database
And if all stuff works, give me a like and mark my post as solution please!
I have checked the file in sites-enabled. This had the same content (/ was the same file) as in sites-available. So i did rm cloud.DOMAIN.nl.conf. Than i did what you told me to do sudo a2ensite cloud.DOMAIN.nl. Now when i look in the sites-enabled folder i see the file i just deleted again. Is this okee?
Changing memory setting worked like a charme!
I have one more thing i would like to change to my Nextcloud setup. But for the sake of keeping the forum readable i will create a new topic and tag you. Because something tells me you will know what to do
When you look close, you will find the new file in sites-enabled is no real file, but a symbolic link to the file in sites-available. That’s the way it should be.
How can i tell it is a symbolic link? EDIT: command ls -t indeed shows me something that tells me it is a link
since you told me to do “sudo apt upgrade” often i just did that. i gave me two errors, what is the way to troubleshoot something like this / solve it?
errors:
a dependency job for hv-kvp.daemon.service failed. See journalctl -xe for details.
and
device-mapper reload ioctl on osprober-linux-sdcl failed: device or resource busy
Command failed