skip to Main Content

I have an Ubuntu 16.04.6 machine and need the SOAP extension enabled for PHP 7.4, but right now it’s only installed for 7.0 The extension itself is present in path /usr/lib/php/20151012/soap.so

I’ve used apt-get remove php-soap and the apt-get install php-soap but it does not get installed anywhere except the 7.0 folder. I have noticed in the 7.0 folder there are certain files and symlinks, which I have duplicated into the 7.4 folder structure. /etc/php/7.4/mods-available now contains soap.ini and a symlink to it named 20-soap.ini was placed in folder /etc/php/7.4/fpm/conf.d This is in keeping with all the other extensions, which were all installed almost exactly a year ago when I upgraded PHP.

In the php.ini file I have uncommented extension=soap.so and I have tried changing that line to extension=/usr/lib/php/20151012/soap.so

service php7.4-fpm restart
service nginx restart

All this to no avail. Can someone slap me upside the head and tell me what I’m missing? Should I try deleting previous PHP versions, then reinstalling the soap extension? I’ve seen threads mentioning specific packages for 7.4 such as php7.4-soap but this is not found in my repositories.

Any help is appreciated!

2

Answers


  1. Try this command apt install php7.4-soap

    Login or Signup to reply.
  2. sudo add-apt-repository ppa:jczaplicki/xenial-php74-temp
    sudo apt-get update
    sudo apt install php7.4-soap
    

    This is adding an external PPA repository to your system. If you do not trust the maintainer you should not do this, since it possibly exposes your system. Also note that this might work for installing php, but there will not be a guarantee that you recvive updates through it (The word "temp" in the repository name indicates that this is only temporary). I would rather recommend compiling it yourself if you really need to have it installed on 16.04.

    Also this will install you php version 7.4.13 , you may have to remove the already installed php 7.4 , and reinstall after you add this ppa

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search