Wilfried's picture

Hi

We like to install the Plugin lifterlms on top off WordPress Appliance from Turnkey Linux.

But lifterlms need PHP 7.2 and not 7.0 like in the WordPress Appliance from Turnkey Linux.

We install php 7.2 in addition (like https://tecadmin.net/install-php-debian-9-stretch/)

But the WordPress Appliance from Turnkey Linux still use 7.0 and not the new (7.2) one.

What do I have to chnage?

Cu

Wilfried

Forum: 
Jeremy Davis's picture

As per the deb.sury.org wiki, I suggest that you just change the default PHP to 7.2. This should do the trick:

update-alternatives --set php /usr/bin/php7.2

Please note though that your whole WordPress install will then use PHP7.2. If there are other PHP7.2 modules required that you haven't installed you may run into some issues with particular functionality. I note the instructions you link to only install php7.2-cli php7.2-common php7.2-curl php7.2-mbstring php7.2-mysql and php7.2-xml. You'll possibly want to also install 'php7.2-gettext' and 'php7.2-gd' as well (plus possibly others?).

As I note, the other option would be to uninstall PHP7.0 completely. Regardless, you can check which PHP packages are installed with this line:

apt-cache policy php* | grep -v "Installed: (none)" | grep "Installed" -B1

Hopefully that gets you going in the right direction. Good luck with it.

Wilfried's picture

Hello Jeremy

1st I try the command, but lifter LMS can not be installed.

Then I did a php Update like https://linuxhostsupport.com/blog/how-to-install-php-7-2-on-debian-9/

Now it works!

Tanks for Help.

Regards

Wilfried

Jeremy Davis's picture

Thanks for posting back!

After having a quick look through that thread, the commands that I didn't consider were the Apache mod_php module! I was under the impression that changing the default PHP being used by the system (i.e. which version of PHP you get when you run 'php <command>') would have been enough to switch from PHP7.0 to PHP7.2. Although TBH, I've tended to remove PHP7.0 altogether (hence why I haven't hit this issue myself).

Anyway, I'm almost certain that the commands to resolve the issue you hit are:

a2dismod php7.0
a2enmod php7.2
service apache2 restart

Add new comment