RuntimeException
Failed to write cache file "/home/congahea/public_html/wp-content/cache/gantry5/rt_ambrosia/twig/e2/e2cdfe270d0753e3a68dff64a806e039c271045729a4478040888c66227eea96.php". RuntimeException thrown with message "Failed to write cache file "/home/congahea/public_html/wp-content/cache/gantry5/rt_ambrosia/twig/e2/e2cdfe270d0753e3a68dff64a806e039c271045729a4478040888c66227eea96.php"." Stacktrace: #7 RuntimeException in /home/congahea/public_html/wp-content/plugins/gantry5/src/classes/Gantry/Component/Twig/TwigCacheFilesystem.php:78 #6 Gantry\Component\Twig\TwigCacheFilesystem:write in /home/congahea/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/lib/Twig/Environment.php:452 #5 Twig_Environment:loadTemplate in /home/congahea/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/lib/Twig/Environment.php:362 #4 Twig_Environment:render in /home/congahea/public_html/wp-content/plugins/gantry5/src/classes/Gantry/Framework/Theme.php:141 #3 Gantry\Framework\Theme:render in /home/congahea/public_html/wp-content/themes/rt_ambrosia/archive.php:27 #2 include in /home/congahea/public_html/wp-includes/template-loader.php:74 #1 require_once in /home/congahea/public_html/wp-blog-header.php:19 #0 require in /home/congahea/public_html/index.php:17
Stack frames (8)
7
RuntimeException
/
classes
/
Gantry
/
Component
/
Twig
/
TwigCacheFilesystem.php
78
6
Gantry
\
Component
\
Twig
\
TwigCacheFilesystem
write
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
452
5
Twig_Environment
loadTemplate
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
362
4
Twig_Environment
render
/
classes
/
Gantry
/
Framework
/
Theme.php
141
3
Gantry
\
Framework
\
Theme
render
/
home
/
congahea
/
public_html
/
wp-content
/
themes
/
rt_ambrosia
/
archive.php
27
2
include
/
home
/
congahea
/
public_html
/
wp-includes
/
template-loader.php
74
1
require_once
/
home
/
congahea
/
public_html
/
wp-blog-header.php
19
0
require
/
home
/
congahea
/
public_html
/
index.php
17
                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')) {
                    // Silence error in case if `opcache.restrict_api` directive is set.
                    @opcache_invalidate($key, true);
                } elseif (function_exists('apc_compile_file')) {
                    @apc_compile_file($key);
                }
            }
            return;
        }
        throw new \RuntimeException(sprintf('Failed to write cache file "%s".', $key));
    }
    /**
     * {@inheritdoc}
     */
    public function getTimestamp($key)
    {
        if (!file_exists($key)) {
            return 0;
        }
        return (int) @filemtime($key);
    }
}
 
            }
 
            if (!$this->isAutoReload() || $this->isTemplateFresh($name, $this->cache->getTimestamp($key))) {
                $this->cache->load($key);
            }
 
            if (!class_exists($cls, false)) {
                $loader = $this->getLoader();
                if (!$loader instanceof Twig_SourceContextLoaderInterface) {
                    $source = new Twig_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 Twig_Error_Runtime(sprintf('Failed to load Twig template "%s", index "%s": cache is corrupted.', $name, $index), -1, $source);
            }
        }
 
        if (!$this->runtimeInitialized) {
            $this->initRuntime();
        @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 $name    The template name
     * @param array  $context An array of parameters to pass to the template
     *
     * @return string The rendered template
     *
     * @throws Twig_Error_Loader  When the template cannot be found
     * @throws Twig_Error_Syntax  When an error occurred during compilation
     * @throws Twig_Error_Runtime When an error occurred during rendering
     */
    public function render($name, array $context = array())
    {
        return $this->loadTemplate($name)->render($context);
    }
 
    /**
     * Displays a template.
     *
     * @param string $name    The template name
     * @param array  $context An array of parameters to pass to the template
     *
     * @throws Twig_Error_Loader  When the template cannot be found
     * @throws Twig_Error_Syntax  When an error occurred during compilation
     * @throws Twig_Error_Runtime When an error occurred during rendering
     */
    public function display($name, array $context = array())
    {
        $this->loadTemplate($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) {
            \Gantry\Debugger::addMessage('Selecting outline (rules, matches, scores):', 'debug');
            \Gantry\Debugger::addMessage($assignments->getPage(), 'debug');
            \Gantry\Debugger::addMessage($assignments->matches(), 'debug');
            \Gantry\Debugger::addMessage($assignments->scores(), 'debug');
        }
 
        $this->setLayout($selected);
    }
 
    public function widgets_init()
    {
        $gantry = Gantry::instance();
 * http://www.gnu.org/licenses/gpl-2.0.html
 */
 
defined('ABSPATH') or die;
 
/*
 * The template for displaying Archive pages.
 *
 * Used to display archive-type pages if nothing more specific matches a query.
 * For example, puts together date-based pages if no date.php file exists.
 *
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 */
 
$gantry = Gantry\Framework\Gantry::instance();
$theme  = $gantry['theme'];
 
// We need to render contents of <head> before plugin content gets added.
$context              = Timber::get_context();
$context['page_head'] = $gantry->isCompatible('5.1.5') ? $theme->render('partials/page_head.html.twig', $context) : null;
 
$templates = ['archive.html.twig', 'index.html.twig'];
 
$context['title'] = __('Archive', 'g5_ambrosia');
if (is_day()) {
    $context['title'] = __('Archive:', 'g5_ambrosia') . ' ' . get_the_date('j F Y');
} else if (is_month()) {
    $context['title'] = __('Archive:', 'g5_ambrosia') . ' ' . get_the_date('F Y');
} else if (is_year()) {
    $context['title'] = __('Archive:', 'g5_ambrosia') . ' ' . get_the_date('Y');
} else if (is_tag()) {
    $context['title'] = single_tag_title('', false);
} else if (is_category()) {
    $context['title'] = single_cat_title('', false);
    array_unshift($templates, 'archive-' . get_query_var('cat') . '.html.twig');
} else if (is_post_type_archive()) {
    $context['title'] = post_type_archive_title('', false);
    array_unshift($templates, 'archive-' . get_post_type() . '.html.twig');
}
 
    elseif ( is_single()         && $template = get_single_template()         ) :
    elseif ( is_page()           && $template = get_page_template()           ) :
    elseif ( is_singular()       && $template = get_singular_template()       ) :
    elseif ( is_category()       && $template = get_category_template()       ) :
    elseif ( is_tag()            && $template = get_tag_template()            ) :
    elseif ( is_author()         && $template = get_author_template()         ) :
    elseif ( is_date()           && $template = get_date_template()           ) :
    elseif ( is_archive()        && $template = get_archive_template()        ) :
    else :
        $template = get_index_template();
    endif;
    /**
     * Filters the path of the current template before including it.
     *
     * @since 3.0.0
     *
     * @param string $template The path of the template to include.
     */
    if ( $template = apply_filters( 'template_include', $template ) ) {
        include( $template );
    } elseif ( current_user_can( 'switch_themes' ) ) {
        $theme = wp_get_theme();
        if ( $theme->errors() ) {
            wp_die( $theme->errors() );
        }
    }
    return;
endif;
 
<?php
/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */
 
if ( !isset($wp_did_header) ) {
 
    $wp_did_header = true;
 
    // Load the WordPress library.
    require_once( dirname(__FILE__) . '/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( dirname( __FILE__ ) . '/wp-blog-header.php' );
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE Apache
REQUEST_URI /category/videos/travel-videos/
PATH /usr/local/bin:/usr/bin:/bin
REDIRECT_STATUS 200
UNIQUE_ID XBm2eSAs2iad5wo3WUNdLgAAAAk
HTTPS on
PHPHANDLER /usr/local/php56/bin/php
HTTP_HOST congahead.com
HTTP_X_REAL_IP 107.21.169.9
HTTP_X_FORWARDED_PROTO https
HTTP_ACCEPT_ENCODING gzip
HTTP_CONNECTION close
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
SERVER_NAME congahead.com
SERVER_ADDR 77.104.139.210
SERVER_PORT 443
REMOTE_ADDR 107.21.169.9
DOCUMENT_ROOT /home/congahea/public_html
SERVER_ADMIN webmaster@congahead.com
SCRIPT_FILENAME /home/congahea/public_html/index.php
REMOTE_PORT 47402
REDIRECT_URL /category/videos/travel-videos/
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.0
REQUEST_METHOD GET
QUERY_STRING
SCRIPT_NAME /index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1545188985.6772
REQUEST_TIME 1545188985
empty
0. Whoops\Handler\PrettyPageHandler