Fatal error: Uncaught Error: Call to undefined function simplexml_load_file()

My YunoHost server

Hardware: VPS bought online
YunoHost version: 4.0.8
I have access to my server : Through SSH

Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

I have a Wordpress installed under Custom App.
Yesterday I upgraded Yunohost to 4.0.8 and since then I can’t access the backend of wordpress - front end works.
I get an error related to a plugin for multi languages.
I went to the plugin website and found these solutions

Run the apt-get upgrade command
Did that = 0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.

Their website says

There are two workarounds for this issue:

  • Install the package php7.0-xml using the Synaptic package manager, which includes SimpleXml.
  • If you are using Ubuntu with ppa: ondrej/php PPA run the following command from the terminal: sudo add-apt-repository -y ppa:ondrej/php && sudo apt update && apt install -y php7.0-mbstring php7.0-zip php7.0-xml

If you are using an even more recent version of PHP, replace all occurrences of 7.0 with the installed version of PHP (e.g. sudo add-apt-repository -y ppa:ondrej/php && sudo apt update && apt install -y php7.1-mbstring php7.1-zip php7.1-xml ).

Looking at Wordpress (another one without the plugin)

Running PHP version: 7.3.22-1+0~20200909.67+debian10~1.gbpdd7b72

So my questions are:
Is it correct to have PHP 7.3.22 with Yunohost? I didn’t (or don’t think I did) change it following the upgrade.

Should I try running
sudo add-apt-repository -y ppa:ondrej/php && sudo apt update && apt install -y php7.**3**-mbstring php7.**3**-zip php7.3**strong text**-xml

or 7.3.22

I don’t want to break anything.

Thank you

Yes

I don’t think adding that ppa is the right thing to do … that’s probably meant for Ubuntu-based setups … Imho you should simply try running :

apt install php7.3-xml

It looks like the problem is deeper in the plugin so I’ll contact the plugin developer as it’s not a Yunohost issue.

Thanks again!

Sorry I’m coming back to this. The error I have is

Fatal error : Uncaught Error: Call to undefined function simplexml_load_file()

So the error seems to be linked to something called simplexml.

As I did
apt install php7.3-xml

Yesterday, now I did

php -m

[PHP Modules]
(…)
shmop
sockets
(…)

Simplexml is not there.

So (using Google as I don’t know what I’m talking about), I did

apt-get install php7.3-simplexml
but that didn’t work

Note, selecting ‘php7.3-xml’ instead of ‘php7.3-simplexml’
php7.3-xml is already the newest version (7.3.22-1+0~20200909.67+debian10~1.gbpdd7b72).
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.

Is there a way to have this thing called simplexml that is used by the plugin WPML on my website allowing me to have multiple languages on Wordpress?

For info, I fixed the issue by forcing the re-install of xml

apt-get --reinstall install php7.3-xml

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.