Fat free framework 设置缓存时出现内部错误

Fat free framework 设置缓存时出现内部错误,fat-free-framework,Fat Free Framework,我正在尝试为我的应用设置缓存。 我的问题是,当我试图使用它时,我得到了错误500。 这是我的代码: <?php include_once '/var/www/libs/mainCache/fatfree-master/lib/base.php'; class CacheManager { private $cache; private $isDebug; const GYM_LIST = "gym_list"; const CHALLENGES_LI

我正在尝试为我的应用设置缓存。 我的问题是,当我试图使用它时,我得到了错误500。 这是我的代码:

<?php


include_once '/var/www/libs/mainCache/fatfree-master/lib/base.php';

class CacheManager
{
    private $cache;
    private $isDebug;

    const GYM_LIST = "gym_list";
    const CHALLENGES_LIST = "challnges_list";


    function __construct($isDebug = false)
    {
        $this->cache = \Cache::instance();
        $this->isDebug = $isDebug;
        $folder = $this->isDebug ? "/var/www/soFitTest/cache/" : "/var/www/soFit/cache/";
        $this->cache->load(true, "folder=".$folder);
    }

    public function exists($id)
    {
        return $this->cache->exists($id);
    }

     public function set($id, $value)
    {
        return $this->cache->set($id, $value);
    }

    public function get($id)
    {
        return $this->cache->get($id);
    }

     public function clear($id)
    {
        return $this->cache->clear($id);
    }


}
我得到:

<!DOCTYPE html>
<html>
    <head>
        <title>500 Internal Server Error</title>
        <style>code{word-wrap:break-word;color:black}.comment,.doc_comment,.ml_comment{color:dimgray;font-style:italic}.variable{color:blueviolet}.const,.constant_encapsed_string,.class_c,.dir,.file,.func_c,.halt_compiler,.line,.method_c,.lnumber,.dnumber{color:crimson}.string,.and_equal,.boolean_and,.boolean_or,.concat_equal,.dec,.div_equal,.inc,.is_equal,.is_greater_or_equal,.is_identical,.is_not_equal,.is_not_identical,.is_smaller_or_equal,.logical_and,.logical_or,.logical_xor,.minus_equal,.mod_equal,.mul_equal,.ns_c,.ns_separator,.or_equal,.plus_equal,.sl,.sl_equal,.sr,.sr_equal,.xor_equal,.start_heredoc,.end_heredoc,.object_operator,.paamayim_nekudotayim{color:black}.abstract,.array,.array_cast,.as,.break,.case,.catch,.class,.clone,.continue,.declare,.default,.do,.echo,.else,.elseif,.empty.enddeclare,.endfor,.endforach,.endif,.endswitch,.endwhile,.eval,.exit,.extends,.final,.for,.foreach,.function,.global,.goto,.if,.implements,.include,.include_once,.instanceof,.interface,.isset,.list,.namespace,.new,.print,.private,.public,.protected,.require,.require_once,.return,.static,.switch,.throw,.try,.unset,.use,.var,.while{color:royalblue}.open_tag,.open_tag_with_echo,.close_tag{color:orange}.ini_section{color:black}.ini_key{color:royalblue}.ini_value{color:crimson}.xml_tag{color:dodgerblue}.xml_attr{color:blueviolet}.xml_data{color:red}.section{color:black}.directive{color:blue}.data{color:dimgray}
</style>
    </head>
    <body>
        <h1>Internal Server Error</h1>
        <p>mkdir(): Permission denied</p>
    </body>
</html>

500内部服务器错误
代码{word wrap:break word;color:black}.comment、.doc_comment、.ml_comment{color:dimgray;字体样式:italic}.variable{color:blueviole}.const、.constant_encapsed_字符串、.class_c、.dir、.file、.func、.halt_编译器、.line、.method_c、.lnumber、.dnumber{color:crimson}.string、.string、.and、.and、.boolean_和、.boolean_或.concat_相等、.dec、.div_相等,.inc,.大于或等于,.等于,.等于,.不等于,.不等于,.小于或等于,.逻辑与,.逻辑与,.逻辑或,.逻辑异或,.负等于,.模等于,.模等于,.多等于,.ns\u c,.分隔符,.或等于,.加等于,.sl,.sl,.sr,.sr等于,.xor等于,.start{herdeoc,.end{herdeoc,.object(对象运算符,.paamayim{nekudotayim,.mul equi equim,.black数组,.cast,.as、.break、.case、.catch、.class、.clone、.continue、.declare、.default、.do、.echo、.elseif、.empty.enddeclare、.endfor、.endforach、.endif、.endswitch、.endwhile、.eval、.exit、.extends、.final、.for、.foreach、.function、.global、.goto、.if、.implements、.include、.include、.include、.include、.include、.insta,.require、.require_once、.return、.static、.switch、.throw、.try、.unset、.use、.var、.while{color:royalblue}.open_tag、.open_tag{color:orange}.close_tag{color:orange}.ini_部分{color:black}.ini_键{color:royalblue}.ini_值{color:crimson}.xml_标记{color:dodgerblue}.xml{attr:blue}.xml{color:blue}.xml数据{color:red color:black}.xml数据}.xml{color}.xml数据}.xml数据{颜色:浅灰色}
内部服务器错误
mkdir():权限被拒绝

“我的文件夹”已设置为完全权限:


您可能还需要创建以下两个文件夹:
cache
tmp
cache->load method only gas 1参数…您的真实参数是多余的。只需删除它并使用一个字符串值即可
<!DOCTYPE html>
<html>
    <head>
        <title>500 Internal Server Error</title>
        <style>code{word-wrap:break-word;color:black}.comment,.doc_comment,.ml_comment{color:dimgray;font-style:italic}.variable{color:blueviolet}.const,.constant_encapsed_string,.class_c,.dir,.file,.func_c,.halt_compiler,.line,.method_c,.lnumber,.dnumber{color:crimson}.string,.and_equal,.boolean_and,.boolean_or,.concat_equal,.dec,.div_equal,.inc,.is_equal,.is_greater_or_equal,.is_identical,.is_not_equal,.is_not_identical,.is_smaller_or_equal,.logical_and,.logical_or,.logical_xor,.minus_equal,.mod_equal,.mul_equal,.ns_c,.ns_separator,.or_equal,.plus_equal,.sl,.sl_equal,.sr,.sr_equal,.xor_equal,.start_heredoc,.end_heredoc,.object_operator,.paamayim_nekudotayim{color:black}.abstract,.array,.array_cast,.as,.break,.case,.catch,.class,.clone,.continue,.declare,.default,.do,.echo,.else,.elseif,.empty.enddeclare,.endfor,.endforach,.endif,.endswitch,.endwhile,.eval,.exit,.extends,.final,.for,.foreach,.function,.global,.goto,.if,.implements,.include,.include_once,.instanceof,.interface,.isset,.list,.namespace,.new,.print,.private,.public,.protected,.require,.require_once,.return,.static,.switch,.throw,.try,.unset,.use,.var,.while{color:royalblue}.open_tag,.open_tag_with_echo,.close_tag{color:orange}.ini_section{color:black}.ini_key{color:royalblue}.ini_value{color:crimson}.xml_tag{color:dodgerblue}.xml_attr{color:blueviolet}.xml_data{color:red}.section{color:black}.directive{color:blue}.data{color:dimgray}
</style>
    </head>
    <body>
        <h1>Internal Server Error</h1>
        <p>mkdir(): Permission denied</p>
    </body>
</html>