Hi, when i try to access to my forum i get the below error and i don't know why....
Warning: file_put_contents(/home/u109713535/public_html/cache/HB/compiled/f26a61d95cfcc4520a30e85c1b927d2d.php): failed to open stream: No such file or directory in /home/u109713535/public_html/sys/CODOF/HB/Render.php on line 113
Warning: include(/home/u109713535/public_html/cache/HB/compiled/f26a61d95cfcc4520a30e85c1b927d2d.php): failed to open stream: No such file or directory in /home/u109713535/public_html/sys/CODOF/HB/Render.php on line 116
Warning: include(): Failed opening '/home/u109713535/public_html/cache/HB/compiled/f26a61d95cfcc4520a30e85c1b927d2d.php' for inclusion (include_path='.:/opt/php-5.5/pear') in /home/u109713535/public_html/sys/CODOF/HB/Render.php on line 116
Fatal error: Function name must be a string in /home/u109713535/public_html/sys/CODOF/HB/Render.php on line 117
I'm not sure to have do something that can allow this
here is my Render.php file code and i have never edit it
<?php
/*
* @CODOLICENSE
*/
namespace CODOF\HB;
class Render {
/**
* Gets Handlebars template for required page
* @param string $tpl
* @return string
*/
public static function get_template_contents($tpl) {
$path = CURR_THEME_PATH . 'templates/' . $tpl . '.html';
if (!file_exists($path)) {
$path = DEF_THEME_DIR . 'templates/' . $tpl . '.html';
}
return file_get_contents($path);
}
/**
* Get data for building DOM from Handlebars template
* @param string $tpl
* @return array
*/
public static function get_template_data($tpl) {
$i18ns = array("find topics tagged", "new", "new replies", "replies", "views", "posted", "read more", "recent by", "Edit", "Delete", "Mark as spam");
switch ($tpl) {
case 'forum/topics' :
$i18ns[] = "new topic";
break;
case 'forum/category' :
break;
case 'forum/topic' :
$i18ns[] = 'reply';
case 'moderation/queue':
$i18ns[] = 'Approve';
$i18ns[] = 'Delete';
}
$trans = array();
foreach ($i18ns as $i18n) {
$trans[$i18n] = _t($i18n);
}
return array(
"const" => self::get_required_constants(),
"i18n" => $trans
);
}
/**
* Get required constants for javascript
* @return array
*/
public static function get_required_constants() {
return array(
"RURI" => RURI,
"DURI" => DURI,
"CAT_IMGS" => CAT_IMGS,
"CAT_ICON_IMGS" => CAT_ICON_IMGS,
//"DEF_AVATAR" => DEF_AVATAR,
"CURR_THEME" => CURR_THEME,
"DEF_THEME_PATH" => DEF_THEME_PATH
);
}
/**
* Generate HTML from Handlebars template
* @param string $tpl
* @param array $data
*/
public static function tpl($tpl, $data) {
$raw = self::get_template_contents($tpl);
$hash = md5($raw);
$cachedPath = ABSPATH . 'cache/HB/compiled/' . $hash . '.php';
if (!file_exists($cachedPath)) {
$contents = \LightnCandy::compile($raw, array(
'flags' => \LightnCandy::FLAG_ERROR_LOG | \LightnCandy::FLAG_STANDALONE | \LightnCandy::FLAG_HANDLEBARS,
"helpers" => array(
"const" => function($args) {
//single argument call
return constant($args[0]);
},
"i18n" => function($args) {
return _t($args[0]);
},
"hide" => function($args) {
return "";
}
)
));
file_put_contents($cachedPath, $contents);
}
$renderer = include $cachedPath;
return $renderer($data);
}
}
Hi, when i try to access to my forum i get the below error and i don't know why....
````
Warning: file_put_contents(/home/u109713535/public_html/cache/HB/compiled/f26a61d95cfcc4520a30e85c1b927d2d.php): failed to open stream: No such file or directory in /home/u109713535/public_html/sys/CODOF/HB/Render.php on line 113
Warning: include(/home/u109713535/public_html/cache/HB/compiled/f26a61d95cfcc4520a30e85c1b927d2d.php): failed to open stream: No such file or directory in /home/u109713535/public_html/sys/CODOF/HB/Render.php on line 116
Warning: include(): Failed opening '/home/u109713535/public_html/cache/HB/compiled/f26a61d95cfcc4520a30e85c1b927d2d.php' for inclusion (include_path='.:/opt/php-5.5/pear') in /home/u109713535/public_html/sys/CODOF/HB/Render.php on line 116
Fatal error: Function name must be a string in /home/u109713535/public_html/sys/CODOF/HB/Render.php on line 117
````
I'm not sure to have do something that can allow this
here is my Render.php file code and i have never edit it
````
&lt;?php
/*
* @CODOLICENSE
*/
namespace CODOF\HB;
class Render {
/**
* Gets Handlebars template for required page
* @param string $tpl
* @return string
*/
public static function get_template_contents($tpl) {
$path = CURR_THEME_PATH . 'templates/' . $tpl . '.html';
if (!file_exists($path)) {
$path = DEF_THEME_DIR . 'templates/' . $tpl . '.html';
}
return file_get_contents($path);
}
/**
* Get data for building DOM from Handlebars template
* @param string $tpl
* @return array
*/
public static function get_template_data($tpl) {
$i18ns = array("find topics tagged", "new", "new replies", "replies", "views", "posted", "read more", "recent by", "Edit", "Delete", "Mark as spam");
switch ($tpl) {
case 'forum/topics' :
$i18ns[] = "new topic";
break;
case 'forum/category' :
break;
case 'forum/topic' :
$i18ns[] = 'reply';
case 'moderation/queue':
$i18ns[] = 'Approve';
$i18ns[] = 'Delete';
}
$trans = array();
foreach ($i18ns as $i18n) {
$trans[$i18n] = _t($i18n);
}
return array(
"const" =&gt; self::get_required_constants(),
"i18n" =&gt; $trans
);
}
/**
* Get required constants for javascript
* @return array
*/
public static function get_required_constants() {
return array(
"RURI" =&gt; RURI,
"DURI" =&gt; DURI,
"CAT_IMGS" =&gt; CAT_IMGS,
"CAT_ICON_IMGS" =&gt; CAT_ICON_IMGS,
//"DEF_AVATAR" =&gt; DEF_AVATAR,
"CURR_THEME" =&gt; CURR_THEME,
"DEF_THEME_PATH" =&gt; DEF_THEME_PATH
);
}
/**
* Generate HTML from Handlebars template
* @param string $tpl
* @param array $data
*/
public static function tpl($tpl, $data) {
$raw = self::get_template_contents($tpl);
$hash = md5($raw);
$cachedPath = ABSPATH . 'cache/HB/compiled/' . $hash . '.php';
if (!file_exists($cachedPath)) {
$contents = \LightnCandy::compile($raw, array(
'flags' =&gt; \LightnCandy::FLAG_ERROR_LOG | \LightnCandy::FLAG_STANDALONE | \LightnCandy::FLAG_HANDLEBARS,
"helpers" =&gt; array(
"const" =&gt; function($args) {
//single argument call
return constant($args[0]);
},
"i18n" =&gt; function($args) {
return _t($args[0]);
},
"hide" =&gt; function($args) {
return "";
}
)
));
file_put_contents($cachedPath, $contents);
}
$renderer = include $cachedPath;
return $renderer($data);
}
}
````
edited Aug 3 '15 at 8:59 am