pickware / shopware

Shopware Repository
http://www.shopware.com
Other
0 stars 0 forks source link

Show wrong OPCache settings in system info #86

Closed niklasbuechner closed 5 years ago

niklasbuechner commented 5 years ago

1. Why is this change necessary?

If two Shopware shops are running on the same server, they might override each others model definition, if the OPCache module is not configured correctly. Depending on the definition, OPCache does not include the directory path in its caching which can lead to multiple files with the same name overriding each other. As a result, the shop will experience sporadic model definition errors which are hard to track down.

This pr will add the critical OPCache settings into the requirements tab, if the OPCache module is enabled.

2. What does this change do, exactly?

This change adds the opcache.use_cwd = 1 and the opcache.validate_root = 1 settings into the requirements tab in case OPCache is used.

3. Describe each step to reproduce the issue or behaviour.

Configure OPCache incorrectly with opcache.use_cwd = 0 and opcache.validate_root = 0. The requirements tab will now show if the correct settings are defined.

4. Please link to the relevant issues (if any).

None

5. Which documentation changes (if any) need to be made because of this PR?

Add the options into the sysadmins guide: https://developers.shopware.com/sysadmins-guide/shopware-5-performance-for-sysadmins/#opcode-cache

6. Checklist

niklasbuechner commented 5 years ago

Opened with https://github.com/shopware/shopware/pull/2052.