cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.3.3 installion fails. [ERROR] Exception: Warning: Zend OPcache API is restricted

SOLVED

Magento 2.3.3 installion fails. [ERROR] Exception: Warning: Zend OPcache API is restricted

Hi,

 

I just downloaded Magento 2.3.3 and I'm installing it on a Digital Ocean Ubuntu 18.04.3 droplet. Everything went fine with the Magento Installer permissions check. Connected to DB fine. Then, when I go to install I get the message via console below.

 

Anyone know what's up?

 

Thanks!

 

Kory

 

------console message begin-----

 

Installing... 0%
Installation is incomplete.
Check the console log for errors before trying again.
Starting Magento installation:
File permissions check...

Required extensions check...

Enabling Maintenance Mode...

Installing deployment configuration...
[ERROR] Exception: Warning: Zend OPcache API is restricted by "restrict_api" configuration directive in /srv/users/frameroom-magento-2/apps/frameroom-magento-2/public/vendor/magento/framework/App/DeploymentConfig/Writer.php on line 154 in /srv/users/frameroom-magento-2/apps/frameroom-magento-2/public/vendor/magento/framework/App/ErrorHandler.php:61
Stack trace:
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'Zend OPcache AP...', '/srv/users/fram...', 154, Array)
#1 /srv/users/frameroom-magento-2/apps/frameroom-magento-2/public/vendor/magento/framework/App/DeploymentConfig/Writer.php(154): opcache_invalidate('/srv/users/fram...')
#2 /srv/users/frameroom-magento-2/apps/frameroom-magento-2/public/setup/src/Magento/Setup/Model/Installer.php(444): Magento\Framework\App\DeploymentConfig\Writer->saveConfig(Array, true)
#3 /srv/users/frameroom-magento-2/apps/frameroom-magento-2/public/setup/src/Magento/Setup/Model/Installer.php(549): Magento\Setup\Model\Installer->createModulesConfig(Array)
#4 [internal function]: Magento\Setup\Model\Installer->installDeploymentConfig(Array)
#5 /srv/users/frameroom-magento-2/apps/frameroom-magento-2/public/setup/src/Magento/Setup/Model/Installer.php(367): call_user_func_array(Array, Array)
#6 /srv/users/frameroom-magento-2/apps/frameroom-magento-2/public/setup/src/Magento/Setup/Controller/Install.php(109): Magento\Setup\Model\Installer->install(Array)
#7 /srv/users/frameroom-magento-2/apps/frameroom-magento-2/public/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php(84): Magento\Setup\Controller\Install->startAction()
#8 /srv/users/frameroom-magento-2/apps/frameroom-magento-2/public/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#9 /srv/users/frameroom-magento-2/apps/frameroom-magento-2/public/vendor/zendframework/zend-eventmanager/src/EventManager.php(179): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure))
#10 /srv/users/frameroom-magento-2/apps/frameroom-magento-2/public/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(116): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent))
#11 /srv/users/frameroom-magento-2/apps/frameroom-magento-2/public/vendor/zendframework/zend-mvc/src/DispatchListener.php(118): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#12 /srv/users/frameroom-magento-2/apps/frameroom-magento-2/public/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#13 /srv/users/frameroom-magento-2/apps/frameroom-magento-2/public/vendor/zendframework/zend-eventmanager/src/EventManager.php(179): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure))
#14 /srv/users/frameroom-magento-2/apps/frameroom-magento-2/public/vendor/zendframework/zend-mvc/src/Application.php(340): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent))
#15 /srv/users/frameroom-magento-2/apps/frameroom-magento-2/public/setup/index.php(39): Zend\Mvc\Application->run()
#16 {main}

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Magento 2.3.3 installion fails. [ERROR] Exception: Warning: Zend OPcache API is restricted

Thanks for the info and sorry for the delay updating this ticket. 

 

This was installed using a Server Pilot instance on a Digital Ocean droplet. The solution, which was provided very quickly by Server Pilot was:

 

To fix the opcache.restrict_api setting, you'd SSH into your server as "root" and edit the file:

/etc/phpX.Y-sp/conf.d/opcache.ini

Once in, add a "#" before the line:

opcache.restrict_api=/restricted

and then restart PHP with:

sudo service phpX.Y-fpm-sp restart

Be sure to substitute the actual PHP version for X.Y.

 

Thanks again and I hope this helps anyone else with a similar issue.

View solution in original post

2 REPLIES 2

Re: Magento 2.3.3 installion fails. [ERROR] Exception: Warning: Zend OPcache API is restricted

HI @frameroom ,

Try the below solution:

https://magento.stackexchange.com/a/95073

I hope it will help you!

Re: Magento 2.3.3 installion fails. [ERROR] Exception: Warning: Zend OPcache API is restricted

Thanks for the info and sorry for the delay updating this ticket. 

 

This was installed using a Server Pilot instance on a Digital Ocean droplet. The solution, which was provided very quickly by Server Pilot was:

 

To fix the opcache.restrict_api setting, you'd SSH into your server as "root" and edit the file:

/etc/phpX.Y-sp/conf.d/opcache.ini

Once in, add a "#" before the line:

opcache.restrict_api=/restricted

and then restart PHP with:

sudo service phpX.Y-fpm-sp restart

Be sure to substitute the actual PHP version for X.Y.

 

Thanks again and I hope this helps anyone else with a similar issue.