I uploaded my project to the web server, Following the security recommendations, I placed the CodeIgniter 4 files in the server's non-public directory:
/home/user/codeigniter
and And in the public directory:
/home/user/public_html
And here is my path:
$pathsPath = FCPATH. '../codeigniter/app/Config/Paths.php';
I placed all files properly like;
|__ public_html (or your domain root folder)
| |assets
| |index.php
| |.htaccess
|
|__ codeigniter
|__ app
|__ system
|__ writable
|__ .env
But i always receive a blank page. Could you help me to handle this problem please
And error.log is:
RITICAL - 2020-10-14 06:12:09 --> ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
#0 [internal function]: CodeIgniter\Debug\Exceptions->errorHandler(2, 'ini_set(): Head...', '/home/catideko/...', 101, Array)
This is wrong
$pathsPath = FCPATH. '../codeigniter/app/Config/Paths.php';You can not useFCPATHand..together like that, you have to provide full path, like$pathsPath = '/home/user/codeigniter/app/Config/Paths.php';Also make sure the path
/home/user/codeigniteris accessible by php, either you need to include that path in yourphp.inior set in your index.phpand than confirm if your path is included
and than confirm if you have updated all paths correctly by following official guidelines
once all setup, make sure your writeable folders has write permissions set. and your App.php includes
Although above setup will work, I suggest you to stick with default composer installation and paths
This will insure seamless updates when CI4 is upgraded, to make your app more secure restrict access in your writeable folder, like with nginx/apache you can restrict which type of files could be opened from those folders.