0

I recently did a dist upgrade on my nextcloud machine form Ubuntu 16.04 to Ubuntu 18.04. After that I got an "Internal Server Error" when trying to access nextcloud. I didn't find anything in the Apache logs, so I searched with cat /var/log/syslog | grep PHP any relevant information on PHP errors. I found:

    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/apcu.so' - /usr/lib/php/20151012/apcu.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/zip.so' - /usr/lib/php/20151012/zip.so: cannot open shared object file: No such file or directory in Unknown on line 0

I checked for the package php-zip and found it to be installed for php7.2 which was the version of php referred to by Ubuntu (checked with php -v).

I could find the reason why Libraries where not used. I want to share the solution, so anyone else in this case can solve it more easily.

1

I created a info.php:

<?php
phpinfo();
?>

to find that Apache was using php7.0 instead of php7.2. The fix then was pretty simple:

sudo a2enmod php7.2
sudo a2dismod php7.0
sudo service apache2 restart

After that nextcloud worked as expected. I found it strange that the dist upgrade didn't ensure that apache was using the most recent version of php. I hope this helps someone in trouble :)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.