Whoops \ Exception \ ErrorException (E_WARNING)
include(/var/www/tutmee/data/www/tutmee.ru/wp-content/themes/tutmee-business/vendor/twig/twig/src/Error/RuntimeError.php): failed to open stream: Too many open files in system Whoops\Exception\ErrorException thrown with message "include(/var/www/tutmee/data/www/tutmee.ru/wp-content/themes/tutmee-business/vendor/twig/twig/src/Error/RuntimeError.php): failed to open stream: Too many open files in system" Stacktrace: #12 Whoops\Exception\ErrorException in /var/www/tutmee/data/www/tutmee.ru/wp-content/themes/tutmee-business/vendor/goaop/framework/src/Instrument/ClassLoading/AopComposerLoader.php:139 #11 include in /var/www/tutmee/data/www/tutmee.ru/wp-content/themes/tutmee-business/vendor/goaop/framework/src/Instrument/ClassLoading/AopComposerLoader.php:139 #10 Go\Instrument\ClassLoading\AopComposerLoader:loadClass in [internal]:0 #9 spl_autoload_call in /var/www/tutmee/data/www/tutmee.ru/wp-content/themes/tutmee-business/vendor/twig/twig/src/Template.php:421 #8 Twig\Template:displayWithErrorHandling in /var/www/tutmee/data/www/tutmee.ru/wp-content/themes/tutmee-business/vendor/twig/twig/src/Template.php:380 #7 Twig\Template:display in /var/www/tutmee/data/www/tutmee.ru/wp-content/themes/tutmee-business/vendor/twig/twig/src/Template.php:392 #6 Twig\Template:render in /var/www/tutmee/data/www/tutmee.ru/wp-content/themes/tutmee-business/vendor/twig/twig/src/TemplateWrapper.php:45 #5 Twig\TemplateWrapper:render in /var/www/tutmee/data/www/tutmee.ru/wp-content/themes/tutmee-business/core/Extension/Twig/SauTwig.php:114 #4 Sau\WP\Theme\Extension\Twig\SauTwig:render in /var/www/tutmee/data/www/tutmee.ru/wp-content/themes/tutmee-business/core/Extension/Twig/SauTwig.php:143 #3 Sau\WP\Theme\Extension\Twig\SauTwig:display in /var/www/tutmee/data/www/tutmee.ru/wp-content/themes/tutmee-business/single-portfolio.php:35 #2 include in /var/www/tutmee/data/www/tutmee.ru/wp-includes/template-loader.php:74 #1 require_once in /var/www/tutmee/data/www/tutmee.ru/wp-blog-header.php:19 #0 require in /var/www/tutmee/data/www/tutmee.ru/index.php:17
Stack frames (13)
12
Whoops\Exception\ErrorException
/vendor/goaop/framework/src/Instrument/ClassLoading/AopComposerLoader.php139
11
include
/vendor/goaop/framework/src/Instrument/ClassLoading/AopComposerLoader.php139
10
Go\Instrument\ClassLoading\AopComposerLoader loadClass
[internal]0
9
spl_autoload_call
/vendor/twig/twig/src/Template.php421
8
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php380
7
Twig\Template display
/vendor/twig/twig/src/Template.php392
6
Twig\Template render
/vendor/twig/twig/src/TemplateWrapper.php45
5
Twig\TemplateWrapper render
/core/Extension/Twig/SauTwig.php114
4
Sau\WP\Theme\Extension\Twig\SauTwig render
/core/Extension/Twig/SauTwig.php143
3
Sau\WP\Theme\Extension\Twig\SauTwig display
/single-portfolio.php35
2
include
/var/www/tutmee/data/www/tutmee.ru/wp-includes/template-loader.php74
1
require_once
/var/www/tutmee/data/www/tutmee.ru/wp-blog-header.php19
0
require
/var/www/tutmee/data/www/tutmee.ru/index.php17
/var/www/tutmee/data/www/tutmee.ru/wp-content/themes/tutmee-business/vendor/goaop/framework/src/Instrument/ClassLoading/AopComposerLoader.php
        unset($loader);
 
        foreach ($loaders as $loader) {
            spl_autoload_register($loader);
        }
 
        return self::$wasInitialized;
    }
 
    /**
     * Autoload a class by it's name
     *
     * @param string $class Name of the class to load
     */
    public function loadClass($class)
    {
        $file = $this->findFile($class);
 
        if ($file !== false) {
            include $file;
        }
    }
 
    /**
     * Finds either the path to the file where the class is defined,
     * or gets the appropriate php://filter stream for the given class.
     *
     * @param string $class
     * @return string|false The path/resource if found, false otherwise.
     */
    public function findFile($class)
    {
        static $isAllowedFilter = null, $isProduction = false;
        if (!$isAllowedFilter) {
            $isAllowedFilter = $this->fileEnumerator->getFilter();
            $isProduction    = !$this->options['debug'];
        }
 
        $file = $this->original->findFile($class);
 
/var/www/tutmee/data/www/tutmee.ru/wp-content/themes/tutmee-business/vendor/goaop/framework/src/Instrument/ClassLoading/AopComposerLoader.php
        unset($loader);
 
        foreach ($loaders as $loader) {
            spl_autoload_register($loader);
        }
 
        return self::$wasInitialized;
    }
 
    /**
     * Autoload a class by it's name
     *
     * @param string $class Name of the class to load
     */
    public function loadClass($class)
    {
        $file = $this->findFile($class);
 
        if ($file !== false) {
            include $file;
        }
    }
 
    /**
     * Finds either the path to the file where the class is defined,
     * or gets the appropriate php://filter stream for the given class.
     *
     * @param string $class
     * @return string|false The path/resource if found, false otherwise.
     */
    public function findFile($class)
    {
        static $isAllowedFilter = null, $isProduction = false;
        if (!$isAllowedFilter) {
            $isAllowedFilter = $this->fileEnumerator->getFilter();
            $isProduction    = !$this->options['debug'];
        }
 
        $file = $this->original->findFile($class);
 
[internal]
/var/www/tutmee/data/www/tutmee.ru/wp-content/themes/tutmee-business/vendor/twig/twig/src/Template.php
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    /**
     * Auto-generated method to display the template with the given context.
     *
     * @param array $context An array of parameters to pass to the template
     * @param array $blocks  An array of blocks to pass to the template
     */
    abstract protected function doDisplay(array $context, array $blocks = []);
}
 
class_alias('Twig\Template', 'Twig_Template');
 
/var/www/tutmee/data/www/tutmee.ru/wp-content/themes/tutmee-business/vendor/twig/twig/src/Template.php
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
/var/www/tutmee/data/www/tutmee.ru/wp-content/themes/tutmee-business/vendor/twig/twig/src/Template.php
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
/var/www/tutmee/data/www/tutmee.ru/wp-content/themes/tutmee-business/vendor/twig/twig/src/TemplateWrapper.php
     * directly (use Twig\Environment::load() instead).
     *
     * @internal
     */
    public function __construct(Environment $env, Template $template)
    {
        $this->env = $env;
        $this->template = $template;
    }
 
    /**
     * Renders the template.
     *
     * @param array $context An array of parameters to pass to the template
     */
    public function render(array $context = []): string
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        return $this->template->render($context, \func_get_args()[1] ?? []);
    }
 
    /**
     * Displays the template.
     *
     * @param array $context An array of parameters to pass to the template
     */
    public function display(array $context = [])
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        $this->template->display($context, \func_get_args()[1] ?? []);
    }
 
    /**
     * Checks if a block is defined.
     *
     * @param string $name    The block name
     * @param array  $context An array of parameters to pass to the template
     */
/var/www/tutmee/data/www/tutmee.ru/wp-content/themes/tutmee-business/core/Extension/Twig/SauTwig.php
            TemplateException::render( $exception );
        }
    }
 
    /**
     * Render twig template
     *
     * @param string|array|stdClass $template Name twig-template or array names
     * @param array                 $var      Vars for template
     *
     * @return string
     * @throws \Twig_Error_Loader
     * @throws \Twig_Error_Runtime
     * @throws \Twig_Error_Syntax
     */
    public static function render( $template, $var = [] ) {
        $var      = apply_filters( 'twig_template_vars', $var );
        $template = self::$twig->load( $template );
 
        return $template->render( $var );
    }
 
    /**
     * Bind vars in global space
     *
     * @param string $name
     * @param mixed  $var
     */
    public static function bind( $name, $var ) {
 
        TwigFilter::twigTemplateVars( function ( $vars ) use ( $name, $var ) {
            $vars[ $name ] = $var;
 
            return $vars;
        } );
    }
 
    /**
     * Display twig template
     *
/var/www/tutmee/data/www/tutmee.ru/wp-content/themes/tutmee-business/core/Extension/Twig/SauTwig.php
 
        TwigFilter::twigTemplateVars( function ( $vars ) use ( $name, $var ) {
            $vars[ $name ] = $var;
 
            return $vars;
        } );
    }
 
    /**
     * Display twig template
     *
     * @param string|array|stdClass $template Name twig-template or array names
     * @param array                 $var      Vars for template
     *
     * @throws \Twig_Error_Loader
     * @throws \Twig_Error_Runtime
     * @throws \Twig_Error_Syntax
     */
    public static function display( $template, $var = [] ) {
        echo self::render( $template, $var );
    }
}
 
/var/www/tutmee/data/www/tutmee.ru/wp-content/themes/tutmee-business/single-portfolio.php
    if ( $prev = get_adjacent_post( true, '', true, \Sau\WP\Theme\Source\Portfolio\PostType::TAX_CATEGORY ) ) {
        $data[ 'footer_nav' ][ 'prev' ][ 'url' ]   = get_permalink( $prev );
        $data[ 'footer_nav' ][ 'prev' ][ 'title' ] = __( 'Предыдущий проект', THEME_LANG );
    }
    if ( $next = get_adjacent_post( true, '', false, \Sau\WP\Theme\Source\Portfolio\PostType::TAX_CATEGORY ) ) {
        $data[ 'footer_nav' ][ 'next' ][ 'url' ]   = get_permalink( $next );
        $data[ 'footer_nav' ][ 'next' ][ 'title' ] = __( 'Следующий проект', THEME_LANG );
    }
 
    $pterm = get_post_meta( get_the_ID(), '_primary_term_' . PostType::TAX_CATEGORY, true );
 
    $link = get_term_link( (int) $pterm );
    if ( ! $link instanceof WP_Error ) {
        $data [ 'tags' ] = wp_get_post_terms( get_the_ID(), PostType::TAX_TAG );
        foreach ( $data[ 'tags' ] as &$tag ) {
            $tag->link = $link . '?' . http_build_query( [ 't' => $tag->term_id ] );
        }
    }
endwhile;
SauTwig::display( '@template/single-portfolio.twig', $data );
 
 
/var/www/tutmee/data/www/tutmee.ru/wp-includes/template-loader.php
    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;
 
/var/www/tutmee/data/www/tutmee.ru/wp-blog-header.php
<?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' );
 
}
 
/var/www/tutmee/data/www/tutmee.ru/index.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.16.1
REQUEST_URI /portfolio/item/noorsoft/
USER tutmee
HOME /var/www/tutmee/data
HTTP_CONNECTION Keep-Alive
HTTP_HOST tutmee.ru
HTTP_ACCEPT_ENCODING br,gzip
HTTP_IF_MODIFIED_SINCE Wed, 20 Jan 2021 13:25:22 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/)
SCRIPT_FILENAME /var/www/tutmee/data/www/tutmee.ru/index.php
REDIRECT_STATUS 200
SERVER_NAME tutmee.ru
SERVER_PORT 443
SERVER_ADDR 176.112.202.240
REMOTE_PORT 59366
REMOTE_ADDR 3.227.235.183
GATEWAY_INTERFACE CGI/1.1
HTTPS on
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /var/www/tutmee/data/www/tutmee.ru
DOCUMENT_URI /index.php
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING
PHP_ADMIN_VALUE sendmail_path = /usr/sbin/sendmail -t -i -f dev@tutmee.ru
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1618125254.0737
REQUEST_TIME 1618125254
empty
0. Whoops\Handler\PrettyPageHandler