RuntimeException
Failed to write cache file "/home/thegr225/public_html/cache/gantry5/g5_hydrogen/twig/f6/f65cf8d0b04a2dbd6c3185eaf3109d03e336e18d226125c446c8596b6d637c25.php". RuntimeException thrown with message "Failed to write cache file "/home/thegr225/public_html/cache/gantry5/g5_hydrogen/twig/f6/f65cf8d0b04a2dbd6c3185eaf3109d03e336e18d226125c446c8596b6d637c25.php"." Stacktrace: #11 RuntimeException in /home/thegr225/public_html/libraries/gantry5/classes/Gantry/Component/Twig/TwigCacheFilesystem.php:78 #10 Gantry\Component\Twig\TwigCacheFilesystem:write in /home/thegr225/public_html/libraries/gantry5/vendor/twig/twig/lib/Twig/Environment.php:457 #9 Twig_Environment:loadTemplate in /home/thegr225/public_html/libraries/gantry5/vendor/twig/twig/lib/Twig/Environment.php:363 #8 Twig_Environment:render in /home/thegr225/public_html/libraries/gantry5/classes/Gantry/Component/Theme/AbstractTheme.php:162 #7 Gantry\Component\Theme\AbstractTheme:render in /home/thegr225/public_html/templates/g5_hydrogen/index.php:23 #6 require in /home/thegr225/public_html/libraries/joomla/document/html/html.php:578 #5 JDocumentHTML:_loadTemplate in /home/thegr225/public_html/libraries/joomla/document/html/html.php:635 #4 JDocumentHTML:_fetchTemplate in /home/thegr225/public_html/libraries/joomla/document/html/html.php:455 #3 JDocumentHTML:parse in /home/thegr225/public_html/libraries/cms/application/cms.php:1045 #2 JApplicationCms:render in /home/thegr225/public_html/libraries/cms/application/site.php:745 #1 JApplicationSite:render in /home/thegr225/public_html/libraries/cms/application/cms.php:258 #0 JApplicationCms:execute in /home/thegr225/public_html/index.php:45
Stack frames (12)
11
RuntimeException
/
classes
/
Gantry
/
Component
/
Twig
/
TwigCacheFilesystem.php
78
10
Gantry
\
Component
\
Twig
\
TwigCacheFilesystem
write
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
457
9
Twig_Environment
loadTemplate
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
363
8
Twig_Environment
render
/
classes
/
Gantry
/
Component
/
Theme
/
AbstractTheme.php
162
7
Gantry
\
Component
\
Theme
\
AbstractTheme
render
/
home
/
thegr225
/
public_html
/
templates
/
g5_hydrogen
/
index.php
23
6
require
/
home
/
thegr225
/
public_html
/
libraries
/
joomla
/
document
/
html
/
html.php
578
5
JDocumentHTML
_loadTemplate
/
home
/
thegr225
/
public_html
/
libraries
/
joomla
/
document
/
html
/
html.php
635
4
JDocumentHTML
_fetchTemplate
/
home
/
thegr225
/
public_html
/
libraries
/
joomla
/
document
/
html
/
html.php
455
3
JDocumentHTML
parse
/
home
/
thegr225
/
public_html
/
libraries
/
cms
/
application
/
cms.php
1045
2
JApplicationCms
render
/
home
/
thegr225
/
public_html
/
libraries
/
cms
/
application
/
site.php
745
1
JApplicationSite
render
/
home
/
thegr225
/
public_html
/
libraries
/
cms
/
application
/
cms.php
258
0
JApplicationCms
execute
/
home
/
thegr225
/
public_html
/
index.php
45
                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.
     *
 
            $this->renderer = $this->extendTwig($twig, $loader);
        }
 
        return $this->renderer;
    }
 
    /**
     * Render a template file by using given context.
     *
     * @param string $file
     * @param array $context
     * @return string
     */
    public function render($file, array $context = [])
    {
        // Include Gantry specific things to the context.
        $context = $this->getContext($context);
 
        return $this->renderer()->render($file, $context);
    }
 
    /**
     * Compile and render twig string.
     *
     * @param string $string
     * @param array $context
     * @return string
     */
    public function compile($string, array $context = [])
    {
        $renderer = $this->renderer();
        $template = $renderer->createTemplate($string);
 
        // Include Gantry specific things to the context.
        $context = $this->getContext($context);
 
        return $template->render($context);
    }
 
 * @author    RocketTheme http://www.rockettheme.com
 * @copyright Copyright (C) 2007 - 2017 RocketTheme, LLC
 * @license   GNU/GPLv2 and later
 *
 * http://www.gnu.org/licenses/gpl-2.0.html
 */
 
defined('_JEXEC') or die;
 
// Bootstrap Gantry framework or fail gracefully (inside included file).
$gantry = include __DIR__ . '/includes/gantry.php';
 
/** @var \Gantry\Framework\Theme $theme */
$theme = $gantry['theme'];
 
// All the custom twig variables can be defined in here:
$context = array();
 
// Render the page.
echo $theme->render('index.html.twig', $context);
 
     * @param   string  $directory  The name of the template
     * @param   string  $filename   The actual filename
     *
     * @return  string  The contents of the template
     *
     * @since   11.1
     */
    protected function _loadTemplate($directory, $filename)
    {
        $contents = '';
 
        // Check to see if we have a valid template file
        if (file_exists($directory . '/' . $filename))
        {
            // Store the file path
            $this->_file = $directory . '/' . $filename;
 
            // Get the file content
            ob_start();
            require $directory . '/' . $filename;
            $contents = ob_get_contents();
            ob_end_clean();
        }
 
        // Try to find a favicon by checking the template and root folder
        $icon = '/favicon.ico';
 
        foreach (array($directory, JPATH_BASE) as $dir)
        {
            if (file_exists($dir . $icon))
            {
                $path = str_replace(JPATH_BASE, '', $dir);
                $path = str_replace('\\', '/', $path);
                $this->addFavicon(JUri::base(true) . $path . $icon);
                break;
            }
        }
 
        return $contents;
    }
 
        if (!file_exists($directory . '/' . $template . '/' . $file))
        {
            $template = 'system';
        }
 
        // Load the language file for the template
        $lang = JFactory::getLanguage();
 
        // 1.5 or core then 1.6
        $lang->load('tpl_' . $template, JPATH_BASE, null, false, true)
            || $lang->load('tpl_' . $template, $directory . '/' . $template, null, false, true);
 
        // Assign the variables
        $this->template = $template;
        $this->baseurl = JUri::base(true);
        $this->params = isset($params['params']) ? $params['params'] : new Registry;
 
        // Load
        $this->_template = $this->_loadTemplate($directory . '/' . $template, $file);
 
        return $this;
    }
 
    /**
     * Parse a document template
     *
     * @return  JDocumentHTML  instance of $this to allow chaining
     *
     * @since   11.1
     */
    protected function _parseTemplate()
    {
        $matches = array();
 
        if (preg_match_all('#<jdoc:include\ type="([^"]+)"(.*)\/>#iU', $this->_template, $matches))
        {
            $template_tags_first = array();
            $template_tags_last = array();
 
            $options['title'] = (isset($args[3])) ? $args[3] : null;
        }
 
        parent::$_buffer[$options['type']][$options['name']][$options['title']] = $content;
 
        return $this;
    }
 
    /**
     * Parses the template and populates the buffer
     *
     * @param   array  $params  Parameters for fetching the template
     *
     * @return  JDocumentHTML instance of $this to allow chaining
     *
     * @since   11.1
     */
    public function parse($params = array())
    {
        return $this->_fetchTemplate($params)->_parseTemplate();
    }
 
    /**
     * Outputs the template to the browser.
     *
     * @param   boolean  $caching  If true, cache the output
     * @param   array    $params   Associative array of attributes
     *
     * @return  The rendered data
     *
     * @since   11.1
     */
    public function render($caching = false, $params = array())
    {
        $this->_caching = $caching;
 
        if (empty($this->_template))
        {
            $this->parse($params);
        }
     */
    protected function render()
    {
        // Setup the document options.
        $this->docOptions['template'] = $this->get('theme');
        $this->docOptions['file']     = $this->get('themeFile', 'index.php');
        $this->docOptions['params']   = $this->get('themeParams');
 
        if ($this->get('themes.base'))
        {
            $this->docOptions['directory'] = $this->get('themes.base');
        }
        // Fall back to constants.
        else
        {
            $this->docOptions['directory'] = defined('JPATH_THEMES') ? JPATH_THEMES : (defined('JPATH_BASE') ? JPATH_BASE : __DIR__) . '/themes';
        }
 
        // Parse the document.
        $this->document->parse($this->docOptions);
 
        // Trigger the onBeforeRender event.
        JPluginHelper::importPlugin('system');
        $this->triggerEvent('onBeforeRender');
 
        $caching = false;
 
        if ($this->isSite() && $this->get('caching') && $this->get('caching', 2) == 2 && !JFactory::getUser()->get('id'))
        {
            $caching = true;
        }
 
        // Render the document.
        $data = $this->document->render($caching, $this->docOptions);
 
        // Set the application output data.
        $this->setBody($data);
 
        // Trigger the onAfterRender event.
        $this->triggerEvent('onAfterRender');
                    $this->setUserState('users.login.form.data', array('return' => JUri::getInstance()->toString()));
                    $this->set('themeFile', 'offline.php');
                    $this->setHeader('Status', '503 Service Temporarily Unavailable', 'true');
                }
 
                if (!is_dir(JPATH_THEMES . '/' . $template->template) && !$this->get('offline'))
                {
                    $this->set('themeFile', 'component.php');
                }
 
                // Ensure themeFile is set by now
                if ($this->get('themeFile') == '')
                {
                    $this->set('themeFile', $file . '.php');
                }
 
                break;
        }
 
        parent::render();
    }
 
    /**
     * Route the application.
     *
     * Routing is the process of examining the request environment to determine which
     * component should receive the request. The component optional parameters
     * are then set in the request object to be processed when the application is being
     * dispatched.
     *
     * @return  void
     *
     * @since   3.2
     */
    protected function route()
    {
        // Execute the parent method
        parent::route();
 
        $Itemid = $this->input->getInt('Itemid', null);
        $this->_messageQueue[] = array('message' => $msg, 'type' => strtolower($type));
    }
 
    /**
     * Execute the application.
     *
     * @return  void
     *
     * @since   3.2
     */
    public function execute()
    {
        // Perform application routines.
        $this->doExecute();
 
        // If we have an application document object, render it.
        if ($this->document instanceof JDocument)
        {
            // Render the application output.
            $this->render();
        }
 
        // If gzip compression is enabled in configuration and the server is compliant, compress the output.
        if ($this->get('gzip') && !ini_get('zlib.output_compression') && (ini_get('output_handler') != 'ob_gzhandler'))
        {
            $this->compress();
 
            // Trigger the onAfterCompress event.
            $this->triggerEvent('onAfterCompress');
        }
 
        // Send the application response.
        $this->respond();
 
        // Trigger the onAfterRespond event.
        $this->triggerEvent('onAfterRespond');
    }
 
    /**
     * Check if the user is required to reset their password.
{
    include_once __DIR__ . '/defines.php';
}
 
if (!defined('_JDEFINES'))
{
    define('JPATH_BASE', __DIR__);
    require_once JPATH_BASE . '/includes/defines.php';
}
 
require_once JPATH_BASE . '/includes/framework.php';
 
// Mark afterLoad in the profiler.
JDEBUG ? $_PROFILER->mark('afterLoad') : null;
 
// Instantiate the application.
$app = JFactory::getApplication('site');
 
// Execute the application.
$app->execute();
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
TZ Europe/London
REDIRECT_UNIQUE_ID XBTjG4aTcOZpslgTKjF6gwAAAAQ
REDIRECT_SCRIPT_URL /index.php/hydrogen/history/information-from-the-archives-at-grove-street
REDIRECT_SCRIPT_URI http://www.the-grove.org.uk/index.php/hydrogen/history/information-from-the-archives-at-grove-street
REDIRECT_HANDLER application/x-httpd-ea-php56
REDIRECT_STATUS 200
UNIQUE_ID XBTjG4aTcOZpslgTKjF6gwAAAAQ
SCRIPT_URL /index.php/hydrogen/history/information-from-the-archives-at-grove-street
SCRIPT_URI http://www.the-grove.org.uk/index.php/hydrogen/history/information-from-the-archives-at-grove-street
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
HTTP_IF_MODIFIED_SINCE Wed, 19 Sep 2018 20:17:47 EDT
HTTP_HOST www.the-grove.org.uk
HTTP_CONNECTION Keep-Alive
HTTP_ACCEPT_ENCODING gzip
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_SOFTWARE Apache
SERVER_NAME www.the-grove.org.uk
SERVER_ADDR 95.128.53.40
SERVER_PORT 80
REMOTE_ADDR 54.167.15.6
DOCUMENT_ROOT /home/thegr225/public_html
REQUEST_SCHEME http
CONTEXT_PREFIX /cgi-sys
CONTEXT_DOCUMENT_ROOT /usr/local/cpanel/cgi-sys/
SERVER_ADMIN webmaster@the-grove.org.uk
SCRIPT_FILENAME /home/thegr225/public_html/index.php
REMOTE_PORT 39274
REDIRECT_URL /index.php/hydrogen/history/information-from-the-archives-at-grove-street
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /index.php/hydrogen/history/information-from-the-archives-at-grove-street
SCRIPT_NAME /index.php
PATH_INFO /hydrogen/history/information-from-the-archives-at-grove-street
PATH_TRANSLATED /home/thegr225/public_html/hydrogen/history/information-from-the-archives-at-grove-street
ORIG_PATH_INFO /index.php/hydrogen/history/information-from-the-archives-at-grove-street
ORIG_SCRIPT_NAME /cgi-sys/ea-php56
ORIG_SCRIPT_FILENAME /usr/local/cpanel/cgi-sys/ea-php56
ORIG_PATH_TRANSLATED /home/thegr225/public_html/index.php/hydrogen/history/information-from-the-archives-at-grove-street
PHP_SELF /index.php/hydrogen/history/information-from-the-archives-at-grove-street
REQUEST_TIME_FLOAT 1544872731.39
REQUEST_TIME 1544872731
argv Array ( )
argc 0
empty
0. Whoops\Handler\PrettyPageHandler