CodeIgniter Forums
All First Tries with CI4 Failing - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9)
+--- Thread: All First Tries with CI4 Failing (/showthread.php?tid=77721)



All First Tries with CI4 Failing - clancey - 10-09-2020

I have been using Codeigniter for years and wanted to upgrade to CI4 on the assumption it will represent an upgrade in performance. 

 I refuse to have the application in the public web directory for security reasons. This was always easy to accomplish with CI3, but I cannot get it to work with CI4 despite editing all the files I could find with paths.

 CI4 appears to have dependencies and hard coded ideas about the location of applications such as PEAR. I am very reluctant to install additional software on the server because I have zero trust in their security. Hence, the server functions with the minimum necessary and the maximum possible number of programs disabled.

 I am really unsure how to proceed, other than sticking with CI3. Recoding applications for a new system is not an issue for me. But, out of the box functionality like we have in CI3 is.


RE: All First Tries with CI4 Failing - InsiteFX - 10-09-2020

The file you are looking for is app\Config\Paths.php


RE: All First Tries with CI4 Failing - clancey - 10-10-2020

I edited the paths file to reflect all the correct full path names. I am now getting a server error.


RE: All First Tries with CI4 Failing - InsiteFX - 10-11-2020

CodeIgniter 4 does not have the app and system folders in the public web space there in the root.


RE: All First Tries with CI4 Failing - clancey - 10-11-2020

In the index.php file in the public directory in the website I made these changes:

define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR);
$pathsPath = realpath(FCPATH . '/home/example/ci4/app/Config/Paths.php');
chdir(__DIR__);
require $pathsPath;
$paths = new Config\Paths();
$app = require rtrim($paths->systemDirectory, '/ ') . '/bootstrap.php';

In the paths.php file I made these changes:

public $systemDirectory = '/home/example/ci4/system/system';
public $appDirectory = '/home/example/ci4/app';
public $writableDirectory = '/home/example/ci4/writable';
public $testsDirectory = '/home/example/ci4/tests';
public $viewDirectory = '/home/example/ci4/app/Views';

I am obviously doing something wrong, but I am not sure where.

Thank you for looking at this.


RE: All First Tries with CI4 Failing - paulbalandan - 10-12-2020

in public $systemDirectory, are you sure it is system/system/ the correct path?


RE: All First Tries with CI4 Failing - clancey - 10-12-2020

The paths are absolutely correct. It was a strange issue created when I installed CI4. Once I know CI4 works correctly and can start converting the existing website, I will move it to a different location.


RE: All First Tries with CI4 Failing - clancey - 10-12-2020

(10-12-2020, 10:13 AM)clancey Wrote: The paths are absolutely correct. It was a strange issue created when I installed CI4. Once I know CI4 works correctly and can start converting the existing website, I will move it to a different location.
I finally figured out the problem.

The permissions on the Ci4  index.php file in my system need to be rw-r--r--
but were set to rw-rw-r--

Now to work on converting my website.


RE: All First Tries with CI4 Failing - InsiteFX - 10-23-2020

@Harper25 SPAM!