WordPress.org

Make WordPress Core

Opened 8 hours ago

Last modified 5 hours ago

#49691 reviewing defect (bug)

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 8 hours ago.

Download all attachments as: .zip

Change History (4)

@skithund
8 hours ago

#1 @skithund
8 hours ago

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

#2 @mukesh27
7 hours 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 hours 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
Note: See TracTickets for help on using tickets.