It seems as though the `addSite` maintenance script does not work well when apc is enabled for MediaWiki (site store caching is enabled) and `apc.enable_cli` is off.
**Prerequisites:**
MediaWiki instance with any cache enabledphp.ini setting - apc.enable_cli set to off
**Steps to reproduce:**
- Run maintenance/addSite.php
- Check that the site is visible
**Current behavior:**
The script does run successfully and adds the site to the database, but the site is not visible as the cache is populated with the old data.
The script has added the site to the database.
//**Expected behavior depends on the result of the investigation. The script either warns users that the setting is off, or enables the setting for them (if no adverse effects were detected)**//
Expected behavior depends on the result of the investigation. The script either warns users that the setting is off, or enables the setting for them (if no adverse effects were detected)
**AC**:
- [ ] Investigate how changing this setting (apc.enable_cli) affects mediawiki instances
- [ ] Implement a warning to notify users of this script regarding this pitfall **OR** change the setting from within the script, depending on the outcome of the investigation.
**Hints**:
@addshore Created an initial Gerrit change documenting this slightly https://gerrit.wikimedia.org/r/c/mediawiki/core/+/603570
But this probably needs a better method of being tackled as it will and has caught many people out.
This could be:
- better docs?
- warnings in the script that this is going to happen?
- enabling this setting for the script?
- something else?
**Reading**:
- https://stackoverflow.com/questions/1245242/php-apc-in-cli-mode