7

I am experiencing a "There was a problem processing your request" after a failed mode change. I need some help.
Here's the log output:

a:4:{i:0;s:128:"Can't create directory var/generation/Magento/Framework/App/PageCache/Identifier/.";i:1;s:4945:"#0 vendor/magento/framework/Code/Generator/Autoloader.php(35): Magento\Framework\Code\Generator->generateClass('Magento\\Framewo...')
#1 [internal function]: Magento\Framework\Code\Generator\Autoloader->load('Magento\\Framewo...')
#2 [internal function]: spl_autoload_call('Magento\\Framewo...')
#3 vendor/magento/framework/Code/Reader/ClassReader.php(19): ReflectionClass->__construct('Magento\\Framewo...')
#4 vendor/magento/framework/ObjectManager/Definition/Runtime.php(44): Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\\Framewo...')
#5 vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(71): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Magento\\Framewo...')
#6 vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...')
#7 vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(236): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...')
#8 vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(53): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Framewo...', NULL, 'identifier', 'Magento\\Framewo...')
#9 vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(82): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Framewo...', Array, Array)
#10 vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...')
#11 vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(236): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...')
#12 vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(53): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Framewo...', NULL, 'kernel', 'Magento\\PageCac...')
#13 vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(82): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\PageCac...', Array, Array)
#14 vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\PageCac...')
#15 vendor/magento/framework/Interception/PluginList/PluginList.php(234): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\PageCac...')
#16 vendor/magento/framework/Interception/Chain/Chain.php(66): Magento\Framework\Interception\PluginList\PluginList->getPlugin('Magento\\Framewo...', 'front-controlle...')
#17 vendor/magento/framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
#18 vendor/magento/module-page-cache/Model/App/FrontController/VarnishPlugin.php(55): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#19 [internal function]: Magento\PageCache\Model\App\FrontController\VarnishPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#20 vendor/magento/framework/Interception/Interceptor.php(141): call_user_func_array(Array, Array)
#21 var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#22 vendor/magento/framework/App/Http.php(115): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#23 vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#24 index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#25 {main}";s:3:"url";s:6:"/main/";s:11:"script_name";s:15:"/main/index.php";}
  • I faced same problem and find solution in my case, server not have sufficient space. – Ram Pratap Singh Gour Mar 21 '17 at 7:06
10

This is a permission problem, Magento is unable to write to your var directory.

Please follow the official documentation to setup your permissions properly.

5

Please change the generation folder rewrite permission. Thats work for me.

sudo chmod -R 777  var/*
  • Rather do 755 for dirs and 644 for folders. In special cases go for 775 and 664. – Max May 16 '18 at 15:20
4

This should help - it sets your permissions based on magento documentation.

sudo find . -type d -exec chmod 770 {} \; && sudo find . -type f -exec chmod 660 {} \; && sudo chmod u+x bin/magento
3

in my case,I only execute,and the error disappeared ,as I do not want to chmod too many foders 777.

cd var/generation

chmod -R 777 Magento
  • 1
    its always suggested not to give 777 permission – inrsaurabh Oct 1 '17 at 14:08
-1

I got the same problem but it repeats itself whenever I flush or upgrade the cache, its best to just copy these 2 commands:

sudo chown -R www-data:www-data

sudo chmod -R 775 .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.