Opened 10 years ago
Closed 6 years ago
#37339 closed defect (bug) (worksforme)
Need to invalidate opcode cache after writing configuration
| Reported by: | remicollet | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Upgrade/Install | Version: | |
| Severity: | normal | Keywords: | has-patch needs-testing |
| Cc: | Focuses: |
Description
After writing configuration, when opcache is used, old version is still used (with default configuration value opcache.revalidate_freq=2)
Attachments (1)
Change History (10)
#5
@
6 years ago
- Component General → Upgrade/Install
- Keywords needs-testing added
- Milestone → Awaiting Review
I have not yet been able to confirm this issue is still reproducible. However, the ticket noted above by @swissspidy was fixed as a part of version 5.5. The changes introduced a new wp_opcache_invalidate() function.
If the issue can still be reproduced, that wrapper function should be used instead of the PHP default opcache_invalidate().
@mikeschroder would you be able to take a look at this by chance?
#7
@
6 years ago
@remicollet First, I want to apologize that it's taken as long as it has to have progress on this ticket. Thanks for the ticket and your patch!
I took a look at this today, and want to check in to make sure I understand the problem.
It looks like in setup-config.php, writing to wp-config.php won't happen if wp-config.php already exists, due to this check on line 59.
Since it doesn't write unless it's creating a new file, I believe that means that there wouldn't be any previous settings to invalidate during the setup process.
Could you please walk me through when the changes to wp-config.php happened, and using what method?
Thanks so much!
#8
@
6 years ago
Sorry, but this ticket is soo old that I don't remember how I was able to raise this issue...
Can probably be closed
#9
@
6 years ago
- Milestone Awaiting Review
- Resolution → worksforme
- Status new → closed
@remicollet Thanks much for the feedback, and apologies again for the time lapse.
As far as I can find so far (anyone feel free to correct, of course), it doesn't look like core modifies wp-config.php anywhere other than setup.
I can imagine this happening with a manual edit either outside of the admin panel or from a plugin, but I'm not sure how/where to invalidate for those cases.
I'm going to go ahead and close this, but if you or anyone else experiences this issue, please feel free to reopen!
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Just FYI, this issue is raised in various place, last ex: http://serverfault.com/questions/789313/php70-php-opcache-preventing-cms-install