we can this errors, in our error logs, what is this issues how to resolve this
File /srv/htdocs/wp-content/plugins/wpml-string-translation/StringTranslation/Infrastructure/StringGettext/Command/CreatePhpFileCommand.php Line 26 Message [Repeated 29 more times] 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
is outside that allowed path, so PHP throws the warning.
Also, I noticed that the WP Memory Limit is at 40M, if possible, please increase it to 256M or higher.
-------------
Are you currently hosting the site on wordpress.com by any chance?
This is important, because wordpress.com is strict and most likely won't allow you to edit the php.ini
--------------
If you are not you will most likely be able to edit your php.ini
1. edit your php.ini and either remove or comment out:
opcache.restrict_api=
Or set it to empty:
opcache.restrict_api=""
Then restart PHP / your web server.
If you are on wordpress.com or another hosting environment where editing php.ini is not possible, then you can supress the warnings by deactivating debug, debug display and debug log.
Yes, our site is hosted on WordPress. If we disable debug mode, will this issue be resolved? This is not a permanent fix, right? We consulted the WordPress team, and they advised us to check with you. I’ve shared a screenshot of their response. Could you please guide us on how to resolve this issue?
Thank you for sharing the feedback from the WP team.
I have escalated this issue to our second tier and will update you as soon as I have feedback.
In the meantime you can use the recommendation of turning off debug display and logging which will prevent it from showing in the front end or filling up your log as a temporary workaround.
The warning will not affect the way WPML or your site work as it's not a FATAL error.