Reputation: 13
the system used to work correctly, but then this error occurs I had no idea for the solution since i'm still new to this platform; but I've checked similar issue that suggested its due to missing file directory. Any suggestion?
Attached is the File structure; These files are under a system fileFiles structure
Upvotes: 1
Views: 19136
Reputation: 654
If you are using CI4, create index.php inside project main dir:
<?php
// Path to the front controller (this file)
define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR);
// Ensure the current directory is pointing to the front controller's directory
chdir(__DIR__);
// Load our paths config file
// This is the line that might need to be changed, depending on your folder structure.
$pathsConfig = FCPATH . 'app/Config/Paths.php';
// ^^^ Change this if you move your application folder
require realpath($pathsConfig) ?: $pathsConfig;
$paths = new Config\Paths();
// Location of the framework bootstrap file.
$bootstrap = rtrim($paths->systemDirectory, '\\/ ') . DIRECTORY_SEPARATOR . 'bootstrap.php';
$app = require realpath($bootstrap) ?: $bootstrap;
$app->run();
Upvotes: 0
Reputation: 1
This occures due to the following reasons.
your system folder might be missing
Upvotes: 0
Reputation: 5506
point your system folder correctly, if it is different directory adjust that in the index.php
e.g
$system_path = 'system';
$system_path = '../system';
$system_path = '../../system';
Upvotes: 2
Reputation: 1519
This occures due to the following reasons.
your system folder might be missing
Check your permission of folders
Open your index.php file and find $system_path and
$application_folder.
$system_path = 'system';
$application_folder = 'application';
Upvotes: 2