Jump to content

Zend OPcache API is restricted by "restrict_api" configuration directive


gpautomatic

Recommended Posts

I get http 500 error in back office when tried to edit product.

Last log in var>logs: *ERROR*     v1.7.8.7    2023/02/21 - 12:22:48: Invalid product vars at line 174 in file classes/Link.php

I turned on debug mode and I got this:

Symfony\Component\Debug\Exception\ContextErrorException: Warning: Zend OPcache API is restricted by "restrict_api" configuration directive at src/Adapter/Debug/DebugMode.php:131 at PrestaShop\PrestaShop\Adapter\Debug\DebugMode->updateDebugModeValueInMainFile('false') (src/Adapter/Debug/DebugMode.php:181) at PrestaShop\PrestaShop\Adapter\Debug\DebugMode->changePsModeDevValue('false') (src/Adapter/Debug/DebugMode.php:85) at PrestaShop\PrestaShop\Adapter\Debug\DebugMode->disable() (src/Adapter/Debug/DebugModeConfiguration.php:158) at PrestaShop\PrestaShop\Adapter\Debug\DebugModeConfiguration->updateDebugMode(false) (src/Adapter/Debug/DebugModeConfiguration.php:89) at PrestaShop\PrestaShop\Adapter\Debug\DebugModeConfiguration->updateConfiguration(array('disable_non_native_modules' => false, 'disable_overrides' => false, 'debug_mode' => false)) (src/PrestaShopBundle/Form/Admin/AdvancedParameters/Performance/PerformanceFormDataProvider.php:62) at PrestaShopBundle\Form\Admin\AdvancedParameters\Performance\PerformanceFormDataProvider->setData(array('disable_non_native_modules' => false, 'disable_overrides' => false, 'debug_mode' => false)) (src/Core/Form/Handler.php:125) at PrestaShop\PrestaShop\Core\Form\Handler->save(array('disable_non_native_modules' => false, 'disable_overrides' => false, 'debug_mode' => false)) (src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/PerformanceController.php:227) at PrestaShopBundle\Controller\Admin\Configure\AdvancedParameters\PerformanceController->processForm(object(Request), object(Handler), 'DebugMode') (src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/PerformanceController.php:124) at PrestaShopBundle\Controller\Admin\Configure\AdvancedParameters\PerformanceController->processDebugModeFormAction(object(Request)) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, false) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200) at Symfony\Component\HttpKernel\Kernel->handle(object(Request), 1, false) (admin5454ngebl/index.php:82)

 

I tried to reset htaccess file and didn't worked. 

Does somebody know how to fix this? :)

Link to comment
Share on other sites

  • 8 months later...
  • 7 months later...

I encountered the same problem with Prestashop and solved it. First of all, it is essential to disable debug mode. To do this, modify the defines.inc.php file in the config folder and set PS_MODE_DEV to false. Then, with your ftp, navigate to the var/cache directory. Delete the dev and prod folders. You can also just rename these prod and dev folders to prod_old and dev_old respectively. This action will force Prestashop to recreate these folders and associated cache files when necessary. After making these changes, Prestashop should recreate the cache directories with fresh data, which will correct the problem.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...