PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/zlib.so' - /usr/lib/php/20151012/zlib.so: cannot open shared object file: No such file or directory in Unknown on line 0
The problem is that upgrading from 7.0.3 to 7.0.4 (idk which exact version) doesn't remove the previously created /etc/php/mods-available/zlib.ini - you'll have to remove that (and its symlinks in the conf.d directories) manually. After that no more startup error occurs.
xxx@xxx:~# apt-get upgrade
Unpacking php-common (1:36+deb.sury.org~trusty+1) over (1:7.0+5.6+32+deb.sury.org~trusty+1) ...
dpkg: warning: unable to delete old directory '/etc/php/mods-available': Directory not empty
xxx@xxx:~# grep -r zlib.so /etc/php
/etc/php/mods-available/zlib.ini:extension=zlib.so
@oerdnj Sure, let me know when I should try. Interestingly on our dev machines running 7.0.3-11+deb.sury.org~trusty+1
, zlib.so is located in the correct directory: /etc/php/7.0/mods-available/
Edit: Ah well, they weren't upgraded from PHP5 unlike the servers encountering this bug. Might that be the problem, upgrading from PHP5 to PHP7?
Edit2: It's not a major issue by the way. PHP is starting up completely and everything is working fine.
@cerlestes that depends whether you have updated from (ver << 7.0.3-11) or (7.0.3-11 <= ver << 7.0.4-3). If former the break will occur, if later the your config files have already been updated.
In 7.0.4-3 the zlib has been removed from the list of extensions to be upgraded from /etc/php/mods-available
to /etc/php/X.Y/mods-available
, but the preinst script has just cleaned /etc/php/X.Y/mods-available/zlib.ini
.
This should be fixed in 7.0.4-4+deb.sury.org~*+1
. After builds in php-qa PPA: https://launchpad.net/~ondrej/+archive/ubuntu/php-qa/+packages?batch=200 are finished, you can try upgrading the last server.
@oerdnj Working fine for us now! Thanks once again for your service and dedication.
xxx@xxx:/etc/php# ll mods-available
ls: cannot access /etc/php/mods-available: No such file or directory
xxx@xxx:/etc/php# service php7.0-fpm restart
* Restarting PHP 7.0 FastCGI Process Manager php-fpm7.0 [ OK ]
xxx@xxx:/etc/php# php -v
PHP 7.0.4-4+deb.sury.org~trusty+1 (cli) ( NTS )