1

The owner of the business I work for just upgraded one of our servers to 16.04, and since then, simplexml isn't working anymore.

The error I see in the apache logs is:

Uncaught Error: Call to undefined function simplexml_load_string()

I'm seeing the following when I run php -i:

php: /usr/local/lib/libxml2.so.2: no version information available (required by php)
/usr/local/lib/libxml2.so.2 is a symlink to libxml2.so.2.7.2 in the same directory (/usr/local/lib).

According to webmin, the package currently installed is libxml2.so.2.9.4.
I'm not a Linux guru by any means, but our PHP code needs simplexml, so I need to get this fixed.

Can anyone give any input on how to fix this?

1 Answer 1

0

OK, I finally figured this out after a lot of research and trial/error.

/usr/local/lib/libxml2.so and /usr/local/lib/libxml2.so.2 were both symlinks to /usr/local/lib/libxml2.so.2.7.2

The correct version of libxml to use was 2.9.4, which was installed at /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.4

I removed the symlinks (see below)

 sudo rm /usr/local/lib/libxml2.so
 sudo rm /usr/local/lib/libxml2.so.2

then recreated the symlinks, pointing to the correct version

 sudo ln -s /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.4 /usr/local/lib/libxml2.so
 sudo ln -s /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.4 /usr/local/lib/libxml2.so.2

Once I did this, and restarted Apache, it worked correctly.

And here I was thinking that DLL hell only existed in Windows ;)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .