RuntimeException
Unable to create the cache directory (/home/vilamasa/public_html/wp-content/cache/gantry5/g5_hydrogen/twig/93). RuntimeException thrown with message "Unable to create the cache directory (/home/vilamasa/public_html/wp-content/cache/gantry5/g5_hydrogen/twig/93)." Stacktrace: #9 RuntimeException in /home/vilamasa/public_html/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Cache/FilesystemCache.php:57 #8 Twig\Cache\FilesystemCache:write in /home/vilamasa/public_html/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Environment.php:487 #7 Twig\Environment:loadClass in /home/vilamasa/public_html/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Environment.php:445 #6 Twig\Environment:loadTemplate in /home/vilamasa/public_html/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Environment.php:423 #5 Twig\Environment:load in /home/vilamasa/public_html/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Environment.php:384 #4 Twig\Environment:render in /home/vilamasa/public_html/wp-content/plugins/gantry5/src/classes/Gantry/Framework/Theme.php:153 #3 Gantry\Framework\Theme:render in /home/vilamasa/public_html/wp-content/themes/g5_hydrogen/single.php:29 #2 include in /home/vilamasa/public_html/wp-includes/template-loader.php:113 #1 require_once in /home/vilamasa/public_html/wp-blog-header.php:19 #0 require in /home/vilamasa/public_html/index.php:17
Stack frames (10)
9
RuntimeException
/compat/vendor/twig/twig/src/Cache/FilesystemCache.php57
8
Twig\Cache\FilesystemCache write
/compat/vendor/twig/twig/src/Environment.php487
7
Twig\Environment loadClass
/compat/vendor/twig/twig/src/Environment.php445
6
Twig\Environment loadTemplate
/compat/vendor/twig/twig/src/Environment.php423
5
Twig\Environment load
/compat/vendor/twig/twig/src/Environment.php384
4
Twig\Environment render
/src/classes/Gantry/Framework/Theme.php153
3
Gantry\Framework\Theme render
/home/vilamasa/public_html/wp-content/themes/g5_hydrogen/single.php29
2
include
/home/vilamasa/public_html/wp-includes/template-loader.php113
1
require_once
/home/vilamasa/public_html/wp-blog-header.php19
0
require
/home/vilamasa/public_html/index.php17
        $hash = hash('sha256', $className);
 
        return $this->directory.$hash[0].$hash[1].'/'.$hash.'.php';
    }
 
    public function load($key)
    {
        if (file_exists($key)) {
            @include_once $key;
        }
    }
 
    public function write($key, $content)
    {
        $dir = \dirname($key);
        if (!is_dir($dir)) {
            if (false === @mkdir($dir, 0777, true)) {
                clearstatcache(true, $dir);
                if (!is_dir($dir)) {
                    throw new \RuntimeException(sprintf('Unable to create the cache directory (%s).', $dir));
                }
            }
        } elseif (!is_writable($dir)) {
            throw new \RuntimeException(sprintf('Unable to write in the cache directory (%s).', $dir));
        }
 
        $tmpFile = tempnam($dir, basename($key));
        if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $key)) {
            @chmod($key, 0666 & ~umask());
 
            if (self::FORCE_BYTECODE_INVALIDATION == ($this->options & self::FORCE_BYTECODE_INVALIDATION)) {
                // Compile cached file into bytecode cache
                if (\function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN)) {
                    @opcache_invalidate($key, true);
                } elseif (\function_exists('apc_compile_file')) {
                    apc_compile_file($key);
                }
            }
 
            return;
 
            if (!$this->isAutoReload() || $this->isTemplateFresh($name, $this->cache->getTimestamp($key))) {
                $this->cache->load($key);
            }
 
            $source = null;
            if (!class_exists($cls, false)) {
                $loader = $this->getLoader();
                if (!$loader instanceof SourceContextLoaderInterface) {
                    $source = new Source($loader->getSource($name), $name);
                } else {
                    $source = $loader->getSourceContext($name);
                }
 
                $content = $this->compileSource($source);
 
                if ($this->bcWriteCacheFile) {
                    $this->writeCacheFile($key, $content);
                } else {
                    $this->cache->write($key, $content);
                    $this->cache->load($key);
                }
 
                if (!class_exists($mainCls, false)) {
                    /* Last line of defense if either $this->bcWriteCacheFile was used,
                     * $this->cache is implemented as a no-op or we have a race condition
                     * where the cache was cleared between the above calls to write to and load from
                     * the cache.
                     */
                    eval('?>'.$content);
                }
            }
 
            if (!class_exists($cls, false)) {
                throw new RuntimeError(sprintf('Failed to load Twig template "%s", index "%s": cache might be corrupted.', $name, $index), -1, $source);
            }
        }
 
        if (!$this->runtimeInitialized) {
            $this->initRuntime();
    /**
     * Loads a template internal representation.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @param string $name  The template name
     * @param int    $index The index if it is an embedded template
     *
     * @return \Twig_TemplateInterface A template instance representing the given template name
     *
     * @throws LoaderError  When the template cannot be found
     * @throws RuntimeError When a previously generated cache is corrupted
     * @throws SyntaxError  When an error occurred during compilation
     *
     * @internal
     */
    public function loadTemplate($name, $index = null)
    {
        return $this->loadClass($this->getTemplateClass($name), $name, $index);
    }
 
    /**
     * @internal
     */
    public function loadClass($cls, $name, $index = null)
    {
        $mainCls = $cls;
        if (null !== $index) {
            $cls .= '___'.$index;
        }
 
        if (isset($this->loadedTemplates[$cls])) {
            return $this->loadedTemplates[$cls];
        }
 
        if (!class_exists($cls, false)) {
            if ($this->bcGetCacheFilename) {
                $key = $this->getCacheFilename($name);
            } else {
     *
     * @param string|TemplateWrapper|\Twig\Template $name The template name
     *
     * @throws LoaderError  When the template cannot be found
     * @throws RuntimeError When a previously generated cache is corrupted
     * @throws SyntaxError  When an error occurred during compilation
     *
     * @return TemplateWrapper
     */
    public function load($name)
    {
        if ($name instanceof TemplateWrapper) {
            return $name;
        }
 
        if ($name instanceof Template) {
            return new TemplateWrapper($this, $name);
        }
 
        return new TemplateWrapper($this, $this->loadTemplate($name));
    }
 
    /**
     * Loads a template internal representation.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @param string $name  The template name
     * @param int    $index The index if it is an embedded template
     *
     * @return \Twig_TemplateInterface A template instance representing the given template name
     *
     * @throws LoaderError  When the template cannot be found
     * @throws RuntimeError When a previously generated cache is corrupted
     * @throws SyntaxError  When an error occurred during compilation
     *
     * @internal
     */
    public function loadTemplate($name, $index = null)
        @trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), \E_USER_DEPRECATED);
 
        return $this->templateClassPrefix;
    }
 
    /**
     * Renders a template.
     *
     * @param string|TemplateWrapper $name    The template name
     * @param array                  $context An array of parameters to pass to the template
     *
     * @return string The rendered template
     *
     * @throws LoaderError  When the template cannot be found
     * @throws SyntaxError  When an error occurred during compilation
     * @throws RuntimeError When an error occurred during rendering
     */
    public function render($name, array $context = [])
    {
        return $this->load($name)->render($context);
    }
 
    /**
     * Displays a template.
     *
     * @param string|TemplateWrapper $name    The template name
     * @param array                  $context An array of parameters to pass to the template
     *
     * @throws LoaderError  When the template cannot be found
     * @throws SyntaxError  When an error occurred during compilation
     * @throws RuntimeError When an error occurred during rendering
     */
    public function display($name, array $context = [])
    {
        $this->load($name)->display($context);
    }
 
    /**
     * Loads a template.
     *
 
    /**
     * @see AbstractTheme::render()
     *
     * @param string $file
     * @param array $context
     * @return string
     */
    public function render($file, array $context = [])
    {
        static $timberContext;
 
        if (!isset($timberContext)) {
            $timberContext = Timber::get_context();
        }
 
        // Include Gantry specific things to the context.
        $context = array_replace($timberContext, $context);
 
        return $this->renderer()->render($file, $context);
    }
 
    public function set_template_layout()
    {
        $assignments = new Assignments();
        $selected = $assignments->select();
 
        if (\GANTRY_DEBUGGER) {
            Debugger::addMessage('Selecting outline (rules, matches, scores):', 'debug');
            Debugger::addMessage($assignments->getPage(), 'debug');
            Debugger::addMessage($assignments->matches(), 'debug');
            Debugger::addMessage($assignments->scores(), 'debug');
        }
 
        $this->setLayout($selected);
    }
 
    public function widgets_init()
    {
        $gantry = Gantry::instance();
 */
 
defined('ABSPATH') or die;
 
use Gantry\Framework\Gantry;
use Gantry\Framework\Theme;
use Timber\Timber;
 
/*
 * The Template for displaying all single posts
 */
 
$gantry = Gantry::instance();
 
/** @var Theme $theme */
$theme  = $gantry['theme'];
 
// We need to render contents of <head> before plugin content gets added.
$context              = Timber::get_context();
$context['page_head'] = $theme->render('partials/page_head.html.twig', $context);
 
$post            = Timber::query_post();
$context['post'] = $post;
$context['wp_title'] .= ' - ' . $post->title();
 
Timber::render(['single-' . $post->ID . '.html.twig', 'single-' . $post->post_type . '.html.twig', 'single.html.twig'], $context);
 
        $template = get_index_template();
    }
 
    /**
     * Filters the path of the current template before including it.
     *
     * @since 3.0.0
     *
     * @param string $template The path of the template to include.
     */
    $template   = apply_filters( 'template_include', $template );
    $is_stringy = is_string( $template ) || ( is_object( $template ) && method_exists( $template, '__toString' ) );
    $template   = $is_stringy ? realpath( (string) $template ) : null;
    if (
        is_string( $template ) &&
        ( str_ends_with( $template, '.php' ) || str_ends_with( $template, '.html' ) ) &&
        is_file( $template ) &&
        is_readable( $template )
    ) {
        include $template;
    } elseif ( current_user_can( 'switch_themes' ) ) {
        $theme = wp_get_theme();
        if ( $theme->errors() ) {
            wp_die( $theme->errors() );
        }
    }
    return;
}
 
<?php
/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */
 
if ( ! isset( $wp_did_header ) ) {
 
    $wp_did_header = true;
 
    // Load the WordPress library.
    require_once __DIR__ . '/wp-load.php';
 
    // Set up the WordPress query.
    wp();
 
    // Load the theme template.
    require_once ABSPATH . WPINC . '/template-loader.php';
 
}
 
<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */
 
/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define( 'WP_USE_THEMES', true );
 
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
 

Environment & details:

Key Value
line 17
url file://home/vilamasa/public_html/index.php
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE Apache
REQUEST_URI /open-eyes-part-step-1-donteatbatteries-the-brand-new-owl-house-cartoon/?line=17&url=file%3A%2F%2Fhome%2Fvilamasa%2Fpublic_html%2Findex.php
TZ Asia/Tehran
REDIRECT_REDIRECT_UNIQUE_ID ak04NKBIZXneBabZP-DItQAAAB0
REDIRECT_REDIRECT_SCRIPT_URL /open-eyes-part-step-1-donteatbatteries-the-brand-new-owl-house-cartoon/
REDIRECT_REDIRECT_SCRIPT_URI https://www.vilamasal.com/open-eyes-part-step-1-donteatbatteries-the-brand-new-owl-house-cartoon/
REDIRECT_REDIRECT_HTTPS on
REDIRECT_REDIRECT_SSL_TLS_SNI www.vilamasal.com
REDIRECT_REDIRECT_STATUS 200
REDIRECT_UNIQUE_ID ak04NKBIZXneBabZP-DItQAAAB0
REDIRECT_SCRIPT_URL /open-eyes-part-step-1-donteatbatteries-the-brand-new-owl-house-cartoon/
REDIRECT_SCRIPT_URI https://www.vilamasal.com/open-eyes-part-step-1-donteatbatteries-the-brand-new-owl-house-cartoon/
REDIRECT_HTTPS on
REDIRECT_SSL_TLS_SNI www.vilamasal.com
REDIRECT_HANDLER application/x-httpd-ea-php83
REDIRECT_STATUS 200
UNIQUE_ID ak04NKBIZXneBabZP-DItQAAAB0
SCRIPT_URL /open-eyes-part-step-1-donteatbatteries-the-brand-new-owl-house-cartoon/
SCRIPT_URI https://www.vilamasal.com/open-eyes-part-step-1-donteatbatteries-the-brand-new-owl-house-cartoon/
HTTPS on
SSL_TLS_SNI www.vilamasal.com
HTTP_ACCEPT */*
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_ACCEPT_ENCODING gzip, br, zstd, deflate
HTTP_REFERER https://www.vilamasal.com/subl:/open?line=17&url=file%3A%2F%2Fhome%2Fvilamasa%2Fpublic_html%2Findex.php
HTTP_HOST www.vilamasal.com
HTTP_X_HTTPS 1
PATH /usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/opt/bin
SERVER_SIGNATURE
SERVER_NAME www.vilamasal.com
SERVER_ADDR 213.32.26.219
SERVER_PORT 443
REMOTE_ADDR 216.73.216.75
DOCUMENT_ROOT /home/vilamasa/public_html
REQUEST_SCHEME https
CONTEXT_PREFIX /cgi-sys
CONTEXT_DOCUMENT_ROOT /usr/local/cpanel/cgi-sys/
SERVER_ADMIN webmaster@vilamasal.com
SCRIPT_FILENAME /home/vilamasa/public_html/index.php
REMOTE_PORT 1761
REDIRECT_URL /index.php
REDIRECT_QUERY_STRING line=17&url=file%3A%2F%2Fhome%2Fvilamasa%2Fpublic_html%2Findex.php
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING line=17&url=file%3A%2F%2Fhome%2Fvilamasa%2Fpublic_html%2Findex.php
SCRIPT_NAME /index.php
ORIG_SCRIPT_FILENAME /usr/local/cpanel/cgi-sys/ea-php83
ORIG_PATH_INFO /index.php
ORIG_PATH_TRANSLATED /home/vilamasa/public_html/index.php
ORIG_SCRIPT_NAME /cgi-sys/ea-php83
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1783445556.9181
REQUEST_TIME 1783445556
argv Array ( [0] => line=17&url=file%3A%2F%2Fhome%2Fvilamasa%2Fpublic_html%2Findex.php )
argc 1
empty
0. Whoops\Handler\PrettyPageHandler