Skip to content

ErrorException: Warning: Zend OPcache API is restricted by "restrict_api" configuration directive #34947

@hracik

Description

@hracik

Symfony version(s) affected: 4.4.1

Description
When opcache.restrict_api is set then symfony/http-kernel/Kernel.php (line 555) throws an exception ErrorException Warning: Zend OPcache API is restricted by "restrict_api" configuration directive.

Probably can be fixed same way as this #25985.

How to reproduce

$kernel = new Kernel($env, $debug);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);

Possible Solution

if (\function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), FILTER_VALIDATE_BOOLEAN)) {
  @opcache_invalidate($this->getPath(), true);
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy