SplFileInfo::openFile(/app/tmp/cache/persistent/cake_core_cake_console_):failed to open stream:Permission denied in /lib/…/FileEngine.php line 293

后端 未结 8 1040
孤城傲影
孤城傲影 2020-12-13 20:09

I am working on a CakePHP 2 project. It originally started out in 2.0.x and then recently migrated to 2.1.0. Throughout the whole development process, I have been receivin

相关标签:
8条回答
  • 2020-12-13 20:52

    You can resolve this by adding a mask to your config in core.php

    Cache::config('default', array(
        'engine' => 'File',
        'mask' => 0666,
    ));
    
    0 讨论(0)
  • 2020-12-13 20:52

    If you're encountering the SplFileInfo error in CakePHP2 and you're absolutely certain that your file/directory permissions are set up properly, then one other thing to check is your PHP version. Cake2 requires PHP 5.2.8 or greater and although you'd usually be alerted on the default page if you were using the wrong version, you wouldn't be alerted if you'd developed your app on one server and then moved it to another.

    I experienced this error after developing a Cake2 app on a PHP5.3 server and then moving it to a PHP 5.1 server. Upgrading to 5.2.17 (which is above 5.2.8) solved the problem.

    0 讨论(0)
提交回复
热议问题