RuntimeException
Creating directory failed for /var/www/pung-1/wp-content/cache/gantry5/rt_gemini/compiled/config/5fae0ac87da073a419170e2d76896fc0.php RuntimeException thrown with message "Creating directory failed for /var/www/pung-1/wp-content/cache/gantry5/rt_gemini/compiled/config/5fae0ac87da073a419170e2d76896fc0.php" Stacktrace: #15 RuntimeException in /var/www/pung-1/wp-content/plugins/gantry5/src/vendor/rockettheme/toolbox/File/src/File.php:325 #14 RocketTheme\Toolbox\File\File:save in /var/www/pung-1/wp-content/plugins/gantry5/src/vendor/rockettheme/toolbox/File/src/PhpFile.php:31 #13 RocketTheme\Toolbox\File\PhpFile:save in /var/www/pung-1/wp-content/plugins/gantry5/src/classes/Gantry/Component/Config/CompiledBase.php:263 #12 Gantry\Component\Config\CompiledBase:saveCompiledFile in /var/www/pung-1/wp-content/plugins/gantry5/src/classes/Gantry/Component/Config/CompiledBase.php:109 #11 Gantry\Component\Config\CompiledBase:load in /var/www/pung-1/wp-content/plugins/gantry5/src/classes/Gantry/Component/Config/CompiledConfig.php:79 #10 Gantry\Component\Config\CompiledConfig:load in /var/www/pung-1/wp-content/plugins/gantry5/src/classes/Gantry/Component/Assignments/AbstractAssignments.php:149 #9 Gantry\Component\Assignments\AbstractAssignments:loadAssignments in /var/www/pung-1/wp-content/plugins/gantry5/src/classes/Gantry/Component/Assignments/AbstractAssignments.php:303 #8 Gantry\Component\Assignments\AbstractAssignments:init in /var/www/pung-1/wp-content/plugins/gantry5/src/classes/Gantry/Component/Assignments/AbstractAssignments.php:104 #7 Gantry\Component\Assignments\AbstractAssignments:scores in /var/www/pung-1/wp-content/plugins/gantry5/src/classes/Gantry/Component/Assignments/AbstractAssignments.php:91 #6 Gantry\Component\Assignments\AbstractAssignments:select in /var/www/pung-1/wp-content/plugins/gantry5/src/classes/Gantry/Framework/Theme.php:147 #5 Gantry\Framework\Theme:set_template_layout in /var/www/pung-1/wp-includes/class-wp-hook.php:286 #4 WP_Hook:apply_filters in /var/www/pung-1/wp-includes/class-wp-hook.php:310 #3 WP_Hook:do_action in /var/www/pung-1/wp-includes/plugin.php:465 #2 do_action in /var/www/pung-1/wp-includes/template-loader.php:13 #1 require_once in /var/www/pung-1/wp-blog-header.php:19 #0 require in /var/www/pung-1/index.php:17
Stack frames (16)
15
RuntimeException
/
vendor
/
rockettheme
/
toolbox
/
File
/
src
/
File.php
325
14
RocketTheme
\
Toolbox
\
File
\
File
save
/
vendor
/
rockettheme
/
toolbox
/
File
/
src
/
PhpFile.php
31
13
RocketTheme
\
Toolbox
\
File
\
PhpFile
save
/
classes
/
Gantry
/
Component
/
Config
/
CompiledBase.php
263
12
Gantry
\
Component
\
Config
\
CompiledBase
saveCompiledFile
/
classes
/
Gantry
/
Component
/
Config
/
CompiledBase.php
109
11
Gantry
\
Component
\
Config
\
CompiledBase
load
/
classes
/
Gantry
/
Component
/
Config
/
CompiledConfig.php
79
10
Gantry
\
Component
\
Config
\
CompiledConfig
load
/
classes
/
Gantry
/
Component
/
Assignments
/
AbstractAssignments.php
149
9
Gantry
\
Component
\
Assignments
\
AbstractAssignments
loadAssignments
/
classes
/
Gantry
/
Component
/
Assignments
/
AbstractAssignments.php
303
8
Gantry
\
Component
\
Assignments
\
AbstractAssignments
init
/
classes
/
Gantry
/
Component
/
Assignments
/
AbstractAssignments.php
104
7
Gantry
\
Component
\
Assignments
\
AbstractAssignments
scores
/
classes
/
Gantry
/
Component
/
Assignments
/
AbstractAssignments.php
91
6
Gantry
\
Component
\
Assignments
\
AbstractAssignments
select
/
classes
/
Gantry
/
Framework
/
Theme.php
147
5
Gantry
\
Framework
\
Theme
set_template_layout
/
var
/
www
/
pung-1
/
wp-includes
/
class-wp-hook.php
286
4
WP_Hook
apply_filters
/
var
/
www
/
pung-1
/
wp-includes
/
class-wp-hook.php
310
3
WP_Hook
do_action
/
var
/
www
/
pung-1
/
wp-includes
/
plugin.php
465
2
do_action
/
var
/
www
/
pung-1
/
wp-includes
/
template-loader.php
13
1
require_once
/
var
/
www
/
pung-1
/
wp-blog-header.php
19
0
require
/
var
/
www
/
pung-1
/
index.php
17
        return $this->content;
    }
 
    /**
     * Save file.
     *
     * @param  mixed  $data  Optional data to be saved, usually array.
     * @throws \RuntimeException
     */
    public function save($data = null)
    {
        if ($data !== null) {
            $this->content($data);
        }
 
        $filename = $this->filename;
        $dir = \dirname($filename);
 
        if (!$this->mkdir($dir)) {
            throw new \RuntimeException('Creating directory failed for ' . $filename);
        }
 
        try {
            if ($this->handle) {
                $tmp = true;
                // As we are using non-truncating locking, make sure that the file is empty before writing.
                if (@ftruncate($this->handle, 0) === false || @fwrite($this->handle, $this->raw()) === false) {
                    // Writing file failed, throw an error.
                    $tmp = false;
                }
            } else {
                // Create file with a temporary name and rename it to make the save action atomic.
                $tmp = $this->tempname($filename);
                if (file_put_contents($tmp, $this->raw()) === false) {
                    $tmp = false;
                } elseif (@rename($tmp, $filename) === false) {
                    @unlink($tmp);
                    $tmp = false;
                }
            }
{
    /**
     * @var string
     */
    protected $extension = '.php';
 
    /**
     * @var array|File[]
     */
    static protected $instances = [];
 
    /**
     * Saves PHP file and invalidates opcache.
     *
     * @param  mixed  $data  Optional data to be saved, usually array.
     * @throws \RuntimeException
     */
    public function save($data = null)
    {
        parent::save($data);
 
        // Invalidate configuration file from the opcache.
        if (\function_exists('opcache_invalidate')) {
            // PHP 5.5.5+
            @opcache_invalidate($this->filename, true);
        } elseif (\function_exists('apc_invalidate')) {
            // APC
            @apc_invalidate($this->filename);
        }
    }
 
    /**
     * Check contents and make sure it is in correct format.
     *
     * @param array|object $var
     * @return array
     * @throws \RuntimeException
     */
    protected function check($var)
    {
        try {
            $file->lock(false);
        } catch (\Exception $e) {
            // Another process has locked the file; we will check this in a bit.
        }
 
        if ($file->locked() === false) {
            // File was already locked by another process.
            return;
        }
 
        $cache = [
            '@class' => get_class($this),
            'timestamp' => time(),
            'checksum' => $this->checksum(),
            'files' => $this->files,
            'data' => $this->getState()
        ];
 
        $file->save($cache);
        $file->unlock();
        $file->free();
 
        $this->modified();
    }
 
    protected function getState()
    {
        return $this->object->toArray();
    }
}
 
 
    /**
     * Function gets called when cached configuration is saved.
     */
    public function modified() {}
 
    /**
     * Load the configuration.
     *
     * @return mixed
     */
    public function load()
    {
        if ($this->object) {
            return $this->object;
        }
 
        $filename = $this->createFilename();
        if (!$this->loadCompiledFile($filename) && $this->loadFiles()) {
            $this->saveCompiledFile($filename);
        }
 
        return $this->object;
    }
 
    /**
     * Returns checksum from the configuration files.
     *
     * You can set $this->checksum = false to disable this check.
     *
     * @return bool|string
     */
    public function checksum()
    {
        if (!isset($this->checksum)) {
            $this->checksum = md5(json_encode($this->files) . $this->version);
        }
 
        return $this->checksum;
    }
     *
     * @param callable $blueprints
     * @return $this
     */
    public function setBlueprints(callable $blueprints)
    {
        $this->callable = $blueprints;
 
        return $this;
    }
 
    /**
     * @param bool $withDefaults
     * @return mixed
     */
    public function load($withDefaults = false)
    {
        $this->withDefaults = $withDefaults;
 
        return parent::load();
    }
 
    /**
     * Create configuration object.
     *
     * @param  array  $data
     */
    protected function createObject(array $data = [])
    {
        if ($this->withDefaults && empty($data) && is_callable($this->callable)) {
            $blueprints = $this->callable;
            $data = $blueprints()->getDefaults();
        }
 
        $this->object = new Config($data, $this->callable);
    }
 
    /**
     * Finalize configuration object.
     */
 
        /** @var UniformResourceLocator $locator */
        $locator = $gantry['locator'];
 
        // Find all the assignment files.
        $paths = $locator->findResources("gantry-config://");
        $files = (new ConfigFileFinder)->locateFileInFolder('assignments', $paths);
 
        // Make sure that base or system outlines aren't in the list.
        foreach ($files as $key => $array) {
            if ($key && (((string)$key[0]) === '_' || $key === 'default')) {
                unset($files[$key]);
            }
        }
 
        $cache = $locator->findResource('gantry-cache://theme/compiled/config', true, true);
 
        $config = new CompiledConfig($cache, [$files], GANTRY5_ROOT);
 
        return $config->load()->toArray();
    }
 
    /**
     * Get all assignments for the current page.
     *
     * @return array
     */
    public function getPage()
    {
        $list = [];
 
        foreach($this->types() as $class => $type) {
            $class = is_numeric($class) ? sprintf($this->className, $this->platform, ucfirst($type)) : $class;
 
            if (!class_exists($class)) {
                throw new \RuntimeException("Assignment type {$type} is missing");
            }
 
            /** @var AssignmentsInterface $instance */
            $instance = new $class;
     */
    public function setAssignment($value)
    {
    }
 
    /**
     * Get extra options for assignments.
     *
     * @return array
     */
    public function assignmentOptions()
    {
        return [];
    }
 
    protected function init()
    {
        if (!$this->filter) {
            $this->filter = new AssignmentFilter;
            $this->candidates = $this->loadAssignments();
            $this->page = $this->getPage();
        }
    }
 
    /**
     * Return list of assignment types.
     *
     * @return array
     */
    abstract public function types();
}
 
     *
     * @param string $default
     * @return string
     */
    public function select($default = 'default')
    {
        $scores = $this->scores();
 
        return key($scores) ?: $default;
    }
 
    /**
     * List matching outlines sorted by score.
     *
     * @param array $candidates
     * @return array
     */
    public function scores(array $candidates = null)
    {
        $this->init();
        $candidates = $candidates ?: $this->candidates;
        return $this->filter->scores($candidates, $this->page, $this->specialFilterMethod);
    }
 
    /**
     * List matching outlines with matched assignments.
     *
     * @param array $candidates
     * @return array
     */
    public function matches(array $candidates = null)
    {
        $this->init();
        $candidates = $candidates ?: $this->candidates;
        return $this->filter->matches($candidates, $this->page, $this->specialFilterMethod);
    }
 
    /**
     * Load all assignments.
     *
 
    /**
     * Set (save) assignments.
     *
     * @param array $data
     */
    public function set(array $data)
    {
        $this->save($data);
    }
 
    /**
     * Select assigned outline.
     *
     * @param string $default
     * @return string
     */
    public function select($default = 'default')
    {
        $scores = $this->scores();
 
        return key($scores) ?: $default;
    }
 
    /**
     * List matching outlines sorted by score.
     *
     * @param array $candidates
     * @return array
     */
    public function scores(array $candidates = null)
    {
        $this->init();
        $candidates = $candidates ?: $this->candidates;
        return $this->filter->scores($candidates, $this->page, $this->specialFilterMethod);
    }
 
    /**
     * List matching outlines with matched assignments.
     *
     * @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();
 
        // Positions are set inside layouts and we need to grab all of them as we do not yet know which layout will be
        // displayed. We also need to register all the positions for the admin.
        $positions = $gantry['outlines']->positions();
 
        if (!$positions) {
        }
 
        $nesting_level = $this->nesting_level++;
 
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
        $num_args                           = count( $args );
 
        do {
            $this->current_priority[ $nesting_level ] = $priority = current( $this->iterations[ $nesting_level ] );
 
            foreach ( $this->callbacks[ $priority ] as $the_ ) {
                if ( ! $this->doing_action ) {
                    $args[0] = $value;
                }
 
                // Avoid the array_slice if possible.
                if ( $the_['accepted_args'] == 0 ) {
                    $value = call_user_func_array( $the_['function'], array() );
                } elseif ( $the_['accepted_args'] >= $num_args ) {
                    $value = call_user_func_array( $the_['function'], $args );
                } else {
                    $value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int) $the_['accepted_args'] ) );
                }
            }
        } while ( false !== next( $this->iterations[ $nesting_level ] ) );
 
        unset( $this->iterations[ $nesting_level ] );
        unset( $this->current_priority[ $nesting_level ] );
 
        $this->nesting_level--;
 
        return $value;
    }
 
    /**
     * Executes the callback functions hooked on a specific action hook.
     *
     * @since 4.7.0
     *
     * @param mixed $args Arguments to pass to the hook callbacks.
        } while ( false !== next( $this->iterations[ $nesting_level ] ) );
 
        unset( $this->iterations[ $nesting_level ] );
        unset( $this->current_priority[ $nesting_level ] );
 
        $this->nesting_level--;
 
        return $value;
    }
 
    /**
     * Executes the callback functions hooked on a specific action hook.
     *
     * @since 4.7.0
     *
     * @param mixed $args Arguments to pass to the hook callbacks.
     */
    public function do_action( $args ) {
        $this->doing_action = true;
        $this->apply_filters( '', $args );
 
        // If there are recursive calls to the current action, we haven't finished it until we get to the last one.
        if ( ! $this->nesting_level ) {
            $this->doing_action = false;
        }
    }
 
    /**
     * Processes the functions hooked into the 'all' hook.
     *
     * @since 4.7.0
     *
     * @param array $args Arguments to pass to the hook callbacks. Passed by reference.
     */
    public function do_all_hook( &$args ) {
        $nesting_level                      = $this->nesting_level++;
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
 
        do {
            $priority = current( $this->iterations[ $nesting_level ] );
            array_pop( $wp_current_filter );
        }
        return;
    }
 
    if ( ! isset( $wp_filter['all'] ) ) {
        $wp_current_filter[] = $tag;
    }
 
    $args = array();
    if ( is_array( $arg ) && 1 == count( $arg ) && isset( $arg[0] ) && is_object( $arg[0] ) ) { // array(&$this)
        $args[] =& $arg[0];
    } else {
        $args[] = $arg;
    }
    for ( $a = 2, $num = func_num_args(); $a < $num; $a++ ) {
        $args[] = func_get_arg( $a );
    }
 
    $wp_filter[ $tag ]->do_action( $args );
 
    array_pop( $wp_current_filter );
}
 
/**
 * Retrieve the number of times an action is fired.
 *
 * @since 2.1.0
 *
 * @global array $wp_actions Increments the amount of times action was triggered.
 *
 * @param string $tag The name of the action hook.
 * @return int The number of times action hook $tag is fired.
 */
function did_action( $tag ) {
    global $wp_actions;
 
    if ( ! isset( $wp_actions[ $tag ] ) ) {
        return 0;
    }
<?php
/**
 * Loads the correct template based on the visitor's url
 *
 * @package WordPress
 */
if ( wp_using_themes() ) {
    /**
     * Fires before determining which template to load.
     *
     * @since 1.5.0
     */
    do_action( 'template_redirect' );
}
 
/**
 * Filters whether to allow 'HEAD' requests to generate content.
 *
 * Provides a significant performance bump by exiting before the page
 * content loads for 'HEAD' requests. See #14348.
 *
 * @since 3.5.0
 *
 * @param bool $exit Whether to exit without generating any content for 'HEAD' requests. Default true.
 */
if ( 'HEAD' === $_SERVER['REQUEST_METHOD'] && apply_filters( 'exit_on_http_head', true ) ) {
    exit();
}
 
// Process feeds and trackbacks even if not using themes.
if ( is_robots() ) :
    /**
     * Fired when the template loader determines a robots.txt request.
     *
     * @since 2.1.0
     */
    do_action( 'do_robots' );
    return;
elseif ( is_feed() ) :
    do_feed();
<?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 nginx/1.15.5
REQUEST_URI /general-content/privacy-policy/
USER www-data
HOME /var/www
HTTP_ACCEPT_ENCODING gzip
HTTP_CONNECTION Keep-Alive
HTTP_HOST www.chilipeppermadness.com
HTTP_IF_MODIFIED_SINCE Wed, 21 Aug 2019 10:00:04 GMT
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
REDIRECT_STATUS 200
SERVER_NAME chilipeppermadness.com
SERVER_PORT 443
SERVER_ADDR 157.230.237.115
REMOTE_PORT 40292
REMOTE_ADDR 18.204.48.40
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /var/www/chilipeppermadnesscom/public
DOCUMENT_URI /index.php
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING
SCRIPT_FILENAME /var/www/chilipeppermadnesscom/public/index.php
PATH_INFO
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1571086908.2673
REQUEST_TIME 1571086908
empty
0. Whoops\Handler\PrettyPageHandler