Background of the issue:
I am working on a site under development and encountered an error in the log related to the WPML plugin. The error message is: [04-Jun-2025 12:53:28 UTC] PHP Warning: Zend OPcache API is restricted by "restrict_api" configuration directive in /srv/htdocs/wp-content/plugins/wpml-string-translation/StringTranslation/Infrastructure/StringGettext/Command/CreatePhpFileCommand.php on line 26.
Symptoms:
The error message appears multiple times (70-80 per second) and then stops, only to reappear after some time.
Questions:
How can I resolve the Zend OPcache API restriction error?
Is there a way to prevent this error from occurring repeatedly?