Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore any opcache_invalidate errors #6303

Merged
merged 1 commit into from Sep 26, 2014
Merged

Conversation

stackcoder
Copy link
Contributor

Some webhosters with opcache enabled might disable functions like this for security reasons. This should prevent foreign applications from deleting cached things.

Without ignoring this error piwik is unusable and will always shows the error message:

There is an error. Please report the message (...)
Warning: Zend OPcache API is restricted by "restrict_api" configuration directive in /piwik/core/CacheFile.php on line 219

This call should treat the same way as opcache_reset() in core/Filesystem.php added with faffbd6

Other functions which might be disabled:

  • opcache_reset
  • opcache_get_configuration
  • opcache_get_status
  • opcache_compile_file

Some webhosters with opcache enabled might disable functions like this for security reasons. This should prevent foreign applications from deleting cached things.

Without ignoring this error piwik is unusable and will always shows the error message:
```
There is an error. Please report the message (...)
Warning: Zend OPcache API is restricted by "restrict_api" configuration directive in /piwik/core/CacheFile.php on line 219
```

This call should treat the same way as opcache_reset() in core/Filesystem.php added with faffbd6

Other functions which might be disabled:
- opcache_reset
- opcache_get_configuration
- opcache_get_status
- opcache_compile_file
mattab pushed a commit that referenced this pull request Sep 26, 2014
Ignore any opcache_invalidate errors
@mattab mattab merged commit c26fc1a into matomo-org:master Sep 26, 2014
@mattab
Copy link
Member

mattab commented Sep 26, 2014

Thanks for the pull request and fix. I've made couple other changes 3492bc2 and matomo-org/device-detector@9a515cc

@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label Sep 26, 2014
@mattab mattab added this to the Piwik 2.8.0 milestone Sep 26, 2014
@stackcoder stackcoder deleted the patch-1 branch September 26, 2014 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants