I use the Turnkey Nextcloud LCX appliance.
Just upgraded Nextcloud to v23, and got the message that for Nextcloud v24 PHP7.3 isn't supported anymore.
In the Trunkey repositories, PHP7.3.31 is the latest version. Can I just upgrade it from the PHP website (build it myself), or use the debian repository, or do I need to do something special to upgrade?
Replies (12)
Solution found
Reply 1Ok, now worries! :)
Reply 2Issue
Reply 3Probably just forgot to add some php packages. Saw I got a PHPxxx not found error in Nextcloud, and as it was just a quick and dirty test, I didn't bother to look into it, and just reverted the snapshot.
If I have a bit of time in the coming weeks, I'll clone the container, and see what actually happens and report back.
Hmm, I wonder what the issue is/was?
Reply 4Glad you found the info! Although the fact that you had issues isn't ideal. Perhaps you could consider creating a new test server from a snapshot? That way you can leave your current server as is until you have confirmed you have a working process. Please feel free to post specifics of the issues you hit and I'm more than happy to do my best to help out.
Be careful with this info
Reply 5Don't just follow the guide, and update your Nextcloud-turnkey LCX without making snapshots beforehand :)
Just bricked it a bit when applying the php update. Made a snapshot beforehand, so no harm done. Nice to be able to test it out, probably missed a php package I should've installed. I'll mess with it again when NC24 arrives :)
Hmm, that's strange? Maybe a missing dependency?!
Reply 6The fact that the phpinfo page worked (and I assume reported php7.4 running and didn't show any errors or warnings?!) suggests that PHP itself was working as expected. Nextcloud supports PHP7.4 - in fact, their current docs note that as the minimum version. So that seems an unlikely cause of the issue. So the only thing that occurs to me is that perhaps there is a (php package) Nextcloud dependency missing?
I wasn't explicit about which PHP packages you should install because it will vary from use case to use case. I only documented how to collect the PHP packages (technically, any package that included PHP in it's name) installed and hints around how to work out what you should need to install for the newer PHP version. Perhaps that wasn't explicit enough?
A quick look at the logs might clear that up. If my guess is right (and it's a missing module), it might even be obvious what package needs to be installed? A good place to start is checking the last 20 lines of the Apache error log:
tail -20 /var/log/apache2/error.log
As you probably guessed, you can change the number to show more or less lines. It can sometimes be nice to watch the log live instead:
tail -f /var/log/apache2/error.log
Then you can refresh the page in your browser and you should see the errors appearing in the log in real time.
(Ctrl-C to exit)
Sounds like a plan...! :)
Reply 7Sounds like a plan...! :)
I agree completely. Why fix something that isn't actually broken?!
Turnkey Nextcloud 17.1 ISO?
Reply 8Thanks for posting back with your fix!
Reply 9Thanks for posting back with your fix!
It sounds like there were some PHP modules/libraries missing from your install. I've actually just posted some updated instructions on installing a newer PHP version. It's probably too late for you now, but the first part of that ("Set PHP version to install and collect current PHP version & packages") should ensure that all the same PHP modules/libraries that are installed for the default PHP version, should be installed for the new PHP version.
Thanks
Reply 10found the culprit
Reply 11Upgrade PHP7.3 to 8.X through Webmin & CLI
Reply 12My Idiots Guide: for people who have no idea what their doing but still need to Linux it out...
Upgrading TurnKey Linux PHP to PHP 8.0
On your PC
=======================
- On your PC Download PHP from https://www.php.net/downloads.php select any of the Stable tar.gz
- Log in to WebMin = https://[IP address of turnkey linux]:12321
- go to Tools > File Manager
- open up [usr/share/] folder
- on top menu click [File > Upload to current Directory]
- Drag and drop PHP 8.0 tar.gz file and select upload
- hover on to uploaded file and click on triple colon and select EXTRACT
On the TurnKey Linux machine CLI:
[NOTE: the following will not work for some reason on Webmin for me]
=======================
on the WordPress Appliance Services Window: Click Enter to Quit
Login as root
Run the following commands one line at a time:
apt update apt install -y lsb-release ca-certificates apt-transport-https software-properties-common gnupg2 echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/sury-php.list wget -qO - https://packages.sury.org/php/apt.gpg | apt-key add - apt update apt install php8.0
Restart the Machine by typing:
reboot
after reboot run to confirm php version:
php -v
and if it liked what you've been in putting it should look something like this:
PHP 8.1.13 (cli) (built: Nov 26 2022 14:29:42) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.13, Copyright (c) Zend Technologies
with Znd OPcache v8.1.13, Copyright (c), by Zend Technologies
Note the PHP 8.1.13
Missed the comment from Jeremy in another post about php. Probably had a brainfart when using the search function.
Here's the comment, and how to update PHP if you really need to:
/comment/50598#comment-50598