Hi I am trying to enable soap on my DO server -
Ubuntu 20.04.3 Apache 2.4.41 PHP 7
In the WooCommerce status page this message appears which needs to be enabled for a plugin to work -
SoapClient: Your server does not have the SoapClient class enabled - some gateway plugins which use SOAP may not work as expected.
First I tried -
sudo apt install php7.3-soap
which returned -
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package php7.3-soap E: Couldn't find any package by glob 'php7.3-soap'
Then I tried -
sudo apt install php7.4-soap
which worked but when I do php -m the module isn’t listed and a PHP warning for soap comes up -
PHP Warning: PHP Startup: Unable to load dynamic library 'soap' (tried: /usr/lib/php/20180731/soap (/usr/lib/php/20180731/soap: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/soap.so (/usr/lib/php/20180731/soap.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[PHP Modules] bcmath bz2 calendar Core ctype date dom exif fileinfo filter ftp gd gettext hash iconv intl json libxml mbstring mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql Phar posix readline Reflection session shmop SimpleXML sockets sodium SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter xsl Zend OPcache zip zlib [Zend Modules] Zend OPcache
What’s strange is the PHP warning points to this path - /usr/lib/php/20180731/
When I browse the server I can see soap.so in this location - /usr/lib/php/20190902/soap.so
I tried copying the soap.so file into the 2018 folder but that didn’t fix it.
I have also uncommented out ;extension=soap from all the php.ini files -
/etc/php/7.3/apache2 /etc/php/7.3/cli /etc/php/7.3/fpm
I’m not sure why there isn’t a php.ini file inside /etc/php/7.4.
When I view info.php the server is running PHP Version 7.3.13-1+ubuntu16.04.1+deb.sury.org+1 and soap isn’t listed.
I’ve restarted apache and PHP and still soap isn’t enabled.
When I browse the directories I can see soap is installed here -
I could really do with some help. Please can someone help me fix this?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!