octobercms/october · error · SystemException

system::lang.directory.create_fail

Error message

system::lang.directory.create_fail

What it means

Error "system::lang.directory.create_fail" thrown in octobercms/october.

Source

Thrown at modules/cms/classes/CodeParser.php:377

            if (function_exists('opcache_invalidate') && ini_get('opcache.enable')) {
                opcache_invalidate($path, true);
            }
            elseif (function_exists('apc_compile_file')) {
                apc_compile_file($path);
            }
        }
    }

    /**
     * makeDirectorySafe makes a directory with concurrency support
     */
    protected function makeDirectorySafe($dir)
    {
        $count = 0;

        if (is_dir($dir)) {
            if (!is_writable($dir)) {
                throw new SystemException(Lang::get('system::lang.directory.create_fail', ['name'=>$dir]));
            }

            return;
        }

        while (!is_dir($dir) && !@mkdir($dir, 0755, true)) {
            usleep(rand(50000, 200000));

            if ($count++ > 10) {
                throw new SystemException(Lang::get('system::lang.directory.create_fail', ['name'=>$dir]));
            }
        }

        File::chmodRecursive($dir);
    }
}

View on GitHub (pinned to b608633a7e)

When it happens

Trigger: Thrown at modules/cms/classes/CodeParser.php:377 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21). Data as JSON: /api/errors/f4cb6c17d6f968b1. Report an issue: GitHub.