dah85.com

*not* just another blog ;)

I had a notification in my Ubuntu Server 17.04 terminal saying there's an update to the new version, 17.10, which I decided to do.

It all went smoothly until I fired up nextCloud and got 500 and 503 errors. Apache's error log (/var/log/apache2/error.log) showed a lot of PHP warnings like this;

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/igbinary.so' - /usr/lib/php/20151012/igbinary.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/imagick.so' - /usr/lib/php/20151012/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/memcache.so' - /usr/lib/php/20151012/memcache.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/redis.so' - /usr/lib/php/20151012/redis.so: cannot open shared object file: No such file or directory in Unknown on line 0

Those files didn't exist, this is weird. After trying all sorts of things I've found by googling frantically, the solution turned out to be simple - install the php-7.1 versions of the tools.

Here's what I install for nextCloud to work:

php7.1-gd php7.1-json php7.1-mysql php7.1-curl php7.1-mbstring php7.1-intl php7.1-mcrypt php-imagick php7.1-xml php7.1-zip php7.1 libapache2-mod-php7.1 php7.1-mysql php7.1-curl php7.1-gd php7.1-intl php-pear php-imagick php7.1-imap php7.1-mcrypt php-memcache  php7.1-pspell php7.1-recode php7.1-sqlite3 php7.1-tidy php7.1-xmlrpc php7.1-xsl php7.1-mbstring php-gettext php-redis

After installing those, I removed PHP-7.0 and restarted Apache and it all worked again!

I hope that helps someone :)