WordPress.org

Make WordPress Core

Opened 5 months ago

Closed 5 weeks ago

#49691 closed defect (bug) (fixed)

opcache and restrict_api

Reported by: iheadru Owned by: SergeyBiryukov
Milestone: 5.5 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch
Focuses: administration Cc:

Description (last modified by SergeyBiryukov)

Hello!

Between 4.8 and 4.9 versions of WordPress code became not compatible with opcache restrict_api.

If PHP opcache.restrict_api is defined WordPress generate warnings like these

PHP Warning: Zend OPcache API is restricted by "restrict_api" configuration directive in */wp-admin/includes/file.php on line 502

PHP Warning: Zend OPcache API is restricted by "restrict_api" configuration directive in */wp-admin/includes/file.php on line 604

If PHP display_errors is On this leads to some functions in admin not work.

Attachments (1)

49691.diff (1.1 KB) - added by skithund 5 months ago.

Download all attachments as: .zip

Change History (5)

@skithund
5 months ago

#1 @skithund
5 months ago

Attached is a patch that checks for empty/unrestricted opcache.restrict_api or that opcache.restrict_api has wp-admin

#2 @mukesh27
5 months ago

  • Keywords has-patch added
  • Version 5.3.2 deleted

Hi @iheadru,

Welcome to WordPress Trac! Thanks for the ticket.

@skithund thanks for the patch.

Do you get the same error in the latest version of WordPress?

#3 @SergeyBiryukov
5 months ago

  • Component changed from General to Administration
  • Description modified (diff)
  • Milestone changed from Awaiting Review to 5.5
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#4 @SergeyBiryukov
5 weeks ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

Thanks for the ticket and the patch!

This appears to be resolved in [48160] / #36455.

Note: See TracTickets for help on using tickets.