Make WordPress Core

Opened 8 years ago

Closed 4 years ago

#37339 closed defect (bug) (worksforme)

Need to invalidate opcode cache after writing configuration

Reported by: remicollet's profile remicollet Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords: has-patch needs-testing
Focuses: Cc:

Description

After writing configuration, when opcache is used, old version is still used (with default configuration value opcache.revalidate_freq=2)

Attachments (1)

0001-call-opcache_invalidate-after-write-configuration.patch (830 bytes) - added by remicollet 8 years ago.

Download all attachments as: .zip

Change History (10)

#1 @swissspidy
8 years ago

  • Keywords has-patch added

#2 @swissspidy
8 years ago

  • Version trunk deleted

#4 @swissspidy
8 years ago

See also #36455.

#5 @desrosj
4 years ago

  • Component changed from General to Upgrade/Install
  • Keywords needs-testing added
  • Milestone set to 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?

#6 @kirasong
4 years ago

Yes, I'll take a look -- thank for the ping!

#7 @kirasong
4 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 @remicollet
4 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 @kirasong
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to 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!

Note: See TracTickets for help on using tickets.