Issues with SOAP and DOMDOCUMENT - Cannot get them enabled?

April 19, 2018 864 views
PHP WordPress Ubuntu

Hi All!

I am having trouble enabling SoapClient and Domdocument on a droplet.

Everything seems to be installed, all the modules are there, its active in php.ini but in the back end of the site that is complaining about it I still get;

Your server does not have the SoapClient class enabled - some gateway plugins which use SOAP may not work as expected.

Your server does not have the DOMDocument class enabled - HTML/Multipart emails, and also some extensions, will not work without DOMDocument.

Ive tried installing php-xml - php7.0-xml, php-dom.... everything...

Tried installing as root, removed, then tried installing as a non root user with sudo, nothing.

Its ubuntu 14.4 with php7

This is the phpinfo on the server, replace the bits/spaces in the URL as appropriate etc

hXXp://www.camp bell wat son.co.uk/info.php

Really struggling with this guys!

4 Answers

The PHP soap client is packaged separately from the XML and DOM packages.

sudo apt-get update;
sudo apt-get install php-soap;
sudo service apache2 restart;

Running these will install the soap client and should resolve the error.

  • Hi All,
    Really struggling to get DOMDocument installed on this :(

    Any ideas?

    Here is a list of all PHP modules but no joy still :'(

    ii libapache2-mod-php5 5.5.9+dfsg-1ubuntu4.21 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
    ii libapache2-mod-php7.0 7.0.20-2~ubuntu14.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
    ii libssh2-php 0.12-1build1 amd64 PHP Bindings for libssh2
    ii php-common 1:52+deb.sury.org~trusty+1 all Common files for PHP packages
    ii php-doc 20131001-1 all Documentation for PHP5
    ii php-gd 1:7.2+60+ubuntu14.04.1+deb.sury.org+1 all GD module for PHP [default]
    ii php-gettext 1.0.11-2+deb.sury.org~trusty+1 all read gettext MO files directly, without requiring anything other than PHP
    ii php-mbstring 1:7.2+60+ubuntu14.04.1+deb.sury.org+1 all MBSTRING module for PHP [default]
    ii php-pear 5.5.9+dfsg-1ubuntu4.21 all PEAR - PHP Extension and Application Repository
    ii php-soap 1:7.2+60+ubuntu14.04.1+deb.sury.org+1 all SOAP module for PHP [default]
    ii php-xml 1:7.2+60+ubuntu14.04.1+deb.sury.org+1 all DOM, SimpleXML, WDDX, XML, and XSL module for PHP [default]
    ii php-xmlrpc 1:7.2+60+ubuntu14.04.1+deb.sury.org+1 all XMLRPC-EPI module for PHP [default]
    ii php5 5.5.9+dfsg-1ubuntu4.21 all server-side, HTML-embedded scripting language (metapackage)
    ii php5-cli 5.5.9+dfsg-1ubuntu4.21 amd64 command-line interpreter for the php5 scripting language
    ii php5-common 5.5.9+dfsg-1ubuntu4.21 amd64 Common files for packages built from the php5 source
    ii php5-curl 5.5.9+dfsg-1ubuntu4.21 amd64 CURL module for php5
    ii php5-dev 5.5.9+dfsg-1ubuntu4.21 amd64 Files for PHP5 module development
    ii php5-gd 5.5.9+dfsg-1ubuntu4.21 amd64 GD module for php5
    ii php5-intl 5.5.9+dfsg-1ubuntu4.21 amd64 internationalisation module for php5
    ii php5-json 1.3.2-2build1 amd64 JSON module for php5
    ii php5-mcrypt 5.4.6-0ubuntu5 amd64 MCrypt module for php5
    rc php5-mysql 5.5.9+dfsg-1ubuntu4.21 amd64 MySQL module for php5
    ii php5-mysqlnd 5.5.9+dfsg-1ubuntu4.21 amd64 MySQL module for php5 (Native Driver)
    ii php5-readline 5.5.9+dfsg-1ubuntu4.21 amd64 Readline module for php5
    ii php5-xmlrpc 5.5.9+dfsg-1ubuntu4.21 amd64 XML-RPC module for php5
    ii php7.0 7.0.28-1+ubuntu14.04.1+deb.sury.org+1 all server-side, HTML-embedded scripting language (metapackage)
    ii php7.0-cli 7.0.20-2~ubuntu14.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language
    ii php7.0-common 7.0.20-2~ubuntu14.04.1+deb.sury.org+1 amd64 documentation, examples and common module for PHP
    ii php7.0-curl 7.0.29-1+ubuntu14.04.1+deb.sury.org+1 amd64 CURL module for PHP
    ii php7.0-gd 7.0.29-1+ubuntu14.04.1+deb.sury.org+1 amd64 GD module for PHP
    ii php7.0-json 7.0.20-2~ubuntu14.04.1+deb.sury.org+1 amd64 JSON module for PHP
    ii php7.0-mbstring 7.0.29-1+ubuntu14.04.1+deb.sury.org+1 amd64 MBSTRING module for PHP
    ii php7.0-mysql 7.0.28-1+ubuntu14.04.1+deb.sury.org+1 amd64 MySQL module for PHP
    ii php7.0-opcache 7.0.20-2~ubuntu14.04.1+deb.sury.org+1 amd64 Zend OpCache module for PHP
    ii php7.0-readline 7.0.20-2~ubuntu14.04.1+deb.sury.org+1 amd64 readline module for PHP
    ii php7.0-soap 7.0.29-1+ubuntu14.04.1+deb.sury.org+1 amd64 SOAP module for PHP
    ii php7.0-xml 7.0.29-1+ubuntu14.04.1+deb.sury.org+1 amd64 DOM, SimpleXML, WDDX, XML, and XSL module for PHP
    ii php7.0-xmlrpc 7.0.29-1+ubuntu14.04.1+deb.sury.org+1 amd64 XMLRPC-EPI module for PHP
    ii php7.1-common 7.1.16-1+ubuntu14.04.1+deb.sury.org+1 amd64 documentation, examples and common module for PHP
    ii php7.1-xml 7.1.16-1+ubuntu14.04.1+deb.sury.org+1 amd64 DOM, SimpleXML, WDDX, XML, and XSL module for PHP
    ii php7.2-common 7.2.4-1+ubuntu14.04.1+deb.sury.org+1 amd64 documentation, examples and common module for PHP
    ii php7.2-gd 7.2.4-1+ubuntu14.04.1+deb.sury.org+1 amd64 GD module for PHP
    ii php7.2-mbstring 7.2.4-1+ubuntu14.04.1+deb.sury.org+1 amd64 MBSTRING module for PHP
    ii php7.2-soap 7.2.4-1+ubuntu14.04.1+deb.sury.org+1 amd64 SOAP module for PHP
    ii php7.2-xml 7.2.4-1+ubuntu14.04.1+deb.sury.org+1 amd64 DOM, SimpleXML, WDDX, XML, and XSL module for PHP
    ii php7.2-xmlrpc 7.2.4-1+ubuntu14.04.1+deb.sury.org+1 amd64 XMLRPC-EPI module for PHP
    ii phpmyadmin 4:4.0.10-1 all MySQL web administration tool
    ii pkg-php-tools 1.11 all various packaging tools and scripts for PHP packages

Was already installed - I removed and re-added though but no joy :(

Its as if everything I need is installed but the site isnt picking it up.

So very bizarre.

OK, I ran;

sudo apt-get install php7.0-soap

Which installed soap and it got ticked off the list.

Now just Domdocument

I tried;

sudo apt-get install php7.0-xml

No joy :(

This says that;

php5.6-xml
php7.0-xml
php-xml

Are already installed?

Any ideas?

https://snag.gy/RBgfUp.jpg

Have another answer? Share your knowledge.