cancel
Showing results for 
Search instead for 
Did you mean: 

[ERROR] Exception: Warning: Zend OPcache API is restricted by "restrict_api" configuration directive

[ERROR] Exception: Warning: Zend OPcache API is restricted by "restrict_api" configuration directive

Hi friends,

 

I´m having this problem when I try to install Magento 2.2, MySQL 5.6 and PHP 7.0.23

 

[ERROR] Exception: Warning: Zend OPcache API is restricted by "restrict_api" configuration directive in /home/vesteldigital/novus/magento2/vendor/magento/framework/App/DeploymentConfig/Writer.php on line 152 in /home/vesteldigital/novus/magento2/vendor/magento/framework/App/ErrorHandler.php:61

Stack trace:
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'Zend OPcache AP...', '/home/vesteldig...', 152, Array)
#1 /home/vesteldigital/novus/magento2/vendor/magento/framework/App/DeploymentConfig/Writer.php(152): opcache_invalidate('/home/vesteldig...')
#2 /home/vesteldigital/novus/magento2/setup/src/Magento/Setup/Model/Installer.php(405): Magento\Framework\App\DeploymentConfig\Writer->saveConfig(Array, true)
#3 /home/vesteldigital/novus/magento2/setup/src/Magento/Setup/Model/Installer.php(509): Magento\Setup\Model\Installer->createModulesConfig(Array)
#4 [internal function]: Magento\Setup\Model\Installer->installDeploymentConfig(Array)
#5 /home/vesteldigital/novus/magento2/setup/src/Magento/Setup/Model/Installer.php(342): call_user_func_array(Array, Array)
#6 /home/vesteldigital/novus/magento2/setup/src/Magento/Setup/Controller/Install.php(109): Magento\Setup\Model\Installer->install(Array)
#7 /home/vesteldigital/novus/magento2/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php(82): Magento\Setup\Controller\Install->startAction()
#8 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#9 /home/vesteldigital/novus/magento2/vendor/zendframework/zend-eventmanager/src/EventManager.php(490): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#10 /home/vesteldigital/novus/magento2/vendor/zendframework/zend-eventmanager/src/EventManager.php(214): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#11 /home/vesteldigital/novus/magento2/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(118): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#12 /home/vesteldigital/novus/magento2/vendor/zendframework/zend-mvc/src/DispatchListener.php(93): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#13 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#14 /home/vesteldigital/novus/magento2/vendor/zendframework/zend-eventmanager/src/EventManager.php(490): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#15 /home/vesteldigital/novus/magento2/vendor/zendframework/zend-eventmanager/src/EventManager.php(214): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#16 /home/vesteldigital/novus/magento2/vendor/zendframework/zend-mvc/src/Application.php(314): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#17 /home/vesteldigital/novus/magento2/setup/index.php(35): Zend\Mvc\Application->run()
#18 {main}

 

Thanks a lot in advance.

 

1 REPLY

Re: [ERROR] Exception: Warning: Zend OPcache API is restricted by "restrict_api" configura

Hi @jorgediezprada,

 

Maybe you have disabled OPcache?

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"