Question

How to enable php-mbstring and php-soap on my Ubuntu 18.04 droplet

Running WordPress w/WooCommerce on a Ubuntu 18.04 droplet with PHP 7.4.2.

A WooCommerce Square payment add-in is not accepting payments.

The WooCommerce website status is reporting 2 errors:

Your server does not support the mbstring functions - this is required for better character encoding. Some fallbacks will be used instead for it.
Your server does not have the SoapClient class enabled - some gateway plugins which use SOAP may not work as expected.

Both php-mbstring and php-soap are installed.

A php -i | grep soap command returns:

/etc/php/7.4/cli/conf.d/20-soap.ini,
soap
soap.wsdl_cache => 1 => 1
soap.wsdl_cache_dir => /tmp => /tmp
soap.wsdl_cache_enabled => 1 => 1
soap.wsdl_cache_limit => 5 => 5
soap.wsdl_cache_ttl => 86400 => 86400

A php -i | grep mbstring command returns:

/etc/php/7.4/cli/conf.d/20-mbstring.ini,
Zend Multibyte Support => provided by mbstring
Multibyte decoding support using mbstring => enabled
mbstring
mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.
mbstring.detect_order => no value => no value
mbstring.encoding_translation => Off => Off
mbstring.func_overload => 0 => 0
mbstring.http_input => no value => no value
mbstring.http_output => no value => no value
mbstring.http_output_conv_mimetypes => ^(text/|application/xhtml\+xml) => ^(text/|application/xhtml\+xml)
mbstring.internal_encoding => no value => no value
mbstring.language => neutral => neutral
mbstring.regex_retry_limit => 1000000 => 1000000
mbstring.regex_stack_limit => 100000 => 100000
mbstring.strict_detection => Off => Off
mbstring.substitute_character => no value => no value

I was told by WooCommerce support the line:

mbstring.encoding_translation => Off => Off

Is the problem.

I do not know how to fix or troubleshoot this problem. Thank you in advance for any help you can provide!


Submit an answer


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!

Sign In or Sign Up to Answer

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.

KFSys
Site Moderator
Site Moderator badge
February 14, 2020
Accepted Answer

Hi @mdkennedy,

It does seem like you have mbstring and SOAP enabled on your PHP version. It’s possible however your website is actually picking up another PHP version. You can confirm this by creating a info.php file in your website’s DocumentRoot.

The info file will provide you with all the PHP settings,configurations your website is using. To create it just add an info.php file in your website’s directory and type in the following inside it

<?php

phpinfo();

It should say which PHP version is picking up and help you determine if you actually have mbstring for the said website.

Regards, KDSys

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more