Welcome Guest, Not a member yet? Register   Sign In
All First Tries with CI4 Failing
#1

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.
Reply
#2

The file you are looking for is app\Config\Paths.php
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

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

CodeIgniter 4 does not have the app and system folders in the public web space there in the root.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#5

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.
Reply
#6

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

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.
Reply
#8

(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.
Reply
#9

@Harper25 SPAM!
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB