PHP 7 Error After apt-get update - Package Problem


#1

I just ran apt-get upgrade && update and now I have the following PHP message:

root@web:~# php -v PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20151012/dom.so’ - /usr/lib/php/20151012/dom.so: undefined symbol: php_libxml_node_free_list in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20151012/xmlreader.so’ - /usr/lib/php/20151012/xmlreader.so: undefined symbol: dom_node_class_entry in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20151012/xsl.so’ - /usr/lib/php/20151012/xsl.so: undefined symbol: dom_node_class_entry in Unknown on line 0 PHP 7.0.20-2~ubuntu14.04.1+deb.sury.org+1 (cli) (built: Jun 14 2017 05:55:23) ( NTS ) Copyright © 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright © 1998-2017 Zend Technologies with Zend OPcache v7.0.21-1~ubuntu14.04.1+deb.sury.org+1, Copyright © 1999-2017, by Zend Technologies

This thread covers the issue https://bugs.php.net/bug.php?id=74865 but I believe they are saying there is something wrong with the package… our packaging being Easy Engine? So I believe there is now an issue with PHP 7 easy engine package?

Please help…


#2

You should NEVER run apt-get upgrade to update EE packages.

The correct path to avoid issues is:

ee stack upgrade
apt-get upgrade

I think you can address this problem with:

ee stack remove --php7
ee stack purge --php7
ee stack install --php7

If I didn’t misunderstand your case, it’s something already happened to me: EE uses specific configurations that get overwritten when you upgrade packages using plain apt-get upgrade.


#3

Thank you very much for your response. I have always used

apt-get update && apt-get upgrade

to keep my server up to date. I run it weekly manually.

When I do run that, I’ve noticed that it says lines like:

Calculating upgrade… Done The following packages have been kept back: > hhvm libgd3 linux-generic linux-headers-generic linux-image-generic > nginx-custom nginx-ee openssl php5.6-cli php5.6-common php5.6-fpm php7.0-cli > php7.0-common php7.0-fpm 0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.

So I thought that it was not overwriting the EE stuff anyway? Some times (maybe every 6 months) it does say that the version it trying to install is different from the one current installed by my package maintainer… in these instances I always choose the option to keep the currently installed package maintainers version.

In over 3 years of using EE, this is the first time I have had an issue like this.

I am happy to say your fixed worked though! All I did was run

ee stack upgrade apt-get upgrade

Now I get:

root@web:~# php -v PHP 7.0.21-1~ubuntu14.04.1+deb.sury.org+1 (cli) (built: Jul 6 2017 09:38:10) ( NTS ) Copyright © 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright © 1998-2017 Zend Technologies with Zend OPcache v7.0.21-1~ubuntu14.04.1+deb.sury.org+1, Copyright © 1999-2017, by Zend Technologies

I did not even need to run the remove, purge and install commands. Thank you very much for your help.

If people with EE should never run

apt-get upgrade

then I think this should be added to the documentation or made more clear. I have never seen that before.

Thanks once again!


#4

That’s now what I said.

One should run ee stack upgrade prior to apt-get upgrade. It’s not so hard to get used to it.


#5

It’s not related to ee stack upgrade. It’s a common issue with apt-get. To keep your packages up-to-date, it’s better to use apt instead of apt-get.

For a simple update :
apt update && apt upgrade

For a full update : apt update && apt full-upgrade

Source : debian handbook


#6