Codoforum related discussions
forum inaccessible

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&#039;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 &#039;/home/u109713535/public_html/cache/HB/compiled/f26a61d95cfcc4520a30e85c1b927d2d.php&#039; for inclusion (include_path=&#039;.:/opt/php-5.5/pear&#039;) 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&#039;m not sure to have do something that can allow this here is my Render.php file code and i have never edit it ```` &amp;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 . &#039;templates/&#039; . $tpl . &#039;.html&#039;; if (!file_exists($path)) { $path = DEF_THEME_DIR . &#039;templates/&#039; . $tpl . &#039;.html&#039;; } 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(&quot;find topics tagged&quot;, &quot;new&quot;, &quot;new replies&quot;, &quot;replies&quot;, &quot;views&quot;, &quot;posted&quot;, &quot;read more&quot;, &quot;recent by&quot;, &quot;Edit&quot;, &quot;Delete&quot;, &quot;Mark as spam&quot;); switch ($tpl) { case &#039;forum/topics&#039; : $i18ns[] = &quot;new topic&quot;; break; case &#039;forum/category&#039; : break; case &#039;forum/topic&#039; : $i18ns[] = &#039;reply&#039;; case &#039;moderation/queue&#039;: $i18ns[] = &#039;Approve&#039;; $i18ns[] = &#039;Delete&#039;; } $trans = array(); foreach ($i18ns as $i18n) { $trans[$i18n] = _t($i18n); } return array( &quot;const&quot; =&amp;gt; self::get_required_constants(), &quot;i18n&quot; =&amp;gt; $trans ); } /** * Get required constants for javascript * @return array */ public static function get_required_constants() { return array( &quot;RURI&quot; =&amp;gt; RURI, &quot;DURI&quot; =&amp;gt; DURI, &quot;CAT_IMGS&quot; =&amp;gt; CAT_IMGS, &quot;CAT_ICON_IMGS&quot; =&amp;gt; CAT_ICON_IMGS, //&quot;DEF_AVATAR&quot; =&amp;gt; DEF_AVATAR, &quot;CURR_THEME&quot; =&amp;gt; CURR_THEME, &quot;DEF_THEME_PATH&quot; =&amp;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 . &#039;cache/HB/compiled/&#039; . $hash . &#039;.php&#039;; if (!file_exists($cachedPath)) { $contents = \LightnCandy::compile($raw, array( &#039;flags&#039; =&amp;gt; \LightnCandy::FLAG_ERROR_LOG | \LightnCandy::FLAG_STANDALONE | \LightnCandy::FLAG_HANDLEBARS, &quot;helpers&quot; =&amp;gt; array( &quot;const&quot; =&amp;gt; function($args) { //single argument call return constant($args[0]); }, &quot;i18n&quot; =&amp;gt; function($args) { return _t($args[0]); }, &quot;hide&quot; =&amp;gt; function($args) { return &quot;&quot;; } ) )); file_put_contents($cachedPath, $contents); } $renderer = include $cachedPath; return $renderer($data); } } ````
edited Aug 3 '15 at 8:59 am

Hi,

Does the codoforum folder have the following folder structure:

codoforum
--> cache
------>css
------>HB
--------> compiled
------>js
------>smarty

If it does, try giving 0777 permission to all files and directories in cache .

Hi, Does the codoforum folder have the following folder structure: codoforum --&amp;gt; cache ------&amp;gt;css ------&amp;gt;HB --------&amp;gt; compiled ------&amp;gt;js ------&amp;gt;smarty If it does, try giving 0777 permission to all files and directories in cache .
236
1
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft