SOAP extension for Nginx PHP 7.4 not installing where it is expected

Posted October 20, 2021 147 views

I installed the SOAP package using:

apt-get install php-soap

Now it seems to be installed for PHP 7.0 but I can’t find the location of the extension in order to specify it in my php.ini file for 7.4

Under the directory /etc/php/7.0/fpm/conf.d there is a link:

/etc/php/7.0/fpm/conf.d# ls -l
20-soap.ini -> /etc/php/7.0/mods-available/soap.ini

But under /etc/php/7.4/fpm/conf.d there is not.

Where is the extension actually located?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi @campinjay,

It seems to me if you’ve installed PHP 7.4 you already have the proper repository but when you are trying apt-cache policy php-soap it gives you information only about PHP 7.0.

Can you try

apt-get install php7.4-soap

To see what happens and if it works?

  • I did try that more explicit install, but it failed with package not found. I had installed PHP 7.4 by adding PPA ondrej but now I don’t find a soap extension in his repo.

    Sorry I double posted because I accidentally “signed up” rather than “signing in” earlier. I have another, more detailed question on here. I’m trying to learn how to add some other repos that contain the extension package but when I search on and find one, I go to it and then have no idea what the address is to add to my list file or what apt-add-repository command to use.

    • Hi @jayca6a26e839704c55c3c523d,

      I just tried to install the soap extenstion and it work. What I’ll recommend before trying to instal it to try the following:

      sudo apt-get update
      sudo apt -y install software-properties-common
      sudo add-apt-repository ppa:ondrej/php
      sudo apt-get update