Php segmentation faults

Nextcloud version: 13.0.5
Operating system and version: Raspbian GNU/Linux 9.4

The Nextcloud is offline showing “The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.” in the Browser. If I try to find out my php-Version via php -v or do php -m it just prints out “Segmentation fault”. Also if I try apache2ctl -V it claims that my SSL certificate is empty or doesn’t exist, which it does. The Nextcloud was running for about a year with no problems, but now it seems everything that is somehow related to php fails because of segḿentation faults. Does anyone know what is going on and how to fix it or at least how to get better error messages than just “Segmentation fault”?

Edit: ls -l gives lrwxrwxrwx 1 root root for the fullchain.pem file apache2ctl -V does not find. So I also don’t know what’s wrong here.

Apache error.log should have some hints.

[Wed Aug 22 16:28:35.209610 2018] [mpm_event:notice] [pid 1232:tid 1992638464] AH00493: SIGUSR1 received.  Doing graceful restart
[Wed Aug 22 16:28:36.001001 2018] [mpm_event:notice] [pid 1232:tid 1992638464] AH00489: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2l configured -- resuming normal operations
[Wed Aug 22 16:28:36.001125 2018] [core:notice] [pid 1232:tid 1992638464] AH00094: Command line: '/usr/sbin/apache2'

So no warnings or errors here. The only message I get is still those two words Segmentation fault every time I run php. Until now I just tried to reinstall php via apt-get install --reinstall php7.0 but that helped nothing. Any other ideas where to look for better error messages?

Edit: If you look in the edits of this comment, you see there was one warning in the log file at first, but I resolved it and it was unrelated.

Edit2: A look at systemctl --failed shows that the units nextcloud-domain and php7.0-fpm failed. Doing a systemctl status on both shows that the first one failed because it tried to run php which gave a sementation fault and the second one failed with status=11/SEGV. I guess this also doesn’t help much.

apt-get install --reinstall libcurl3 solved the problem for me. The library was somehow corrupted.