Again: Zend OPcache API is restricted by "restrict_api" configuration directive

OK, there is a proper fix, that I came across while trying to solve this on a serverpilot controlled digital ocean droplet:

The error is caused by a configuration in php.ini for opcache: http://php.net/manual/en/opcache.configuration.php

To resolve, simply edit this setting in your php.ini (or relevant configuration file) for opcache settings. In my case I had an /etc/php7.2-sp/conf.d/opcache.ini file that contained:

opcache.restrict_api=1

I just changed this to:

opcache.restrict_api=

and restarted PHP FPM with: sudo service php7.2-fpm-sp restart