Welcome Guest, Not a member yet? Register   Sign In
Server migration and the Config/Paths.php file
#1

I just migrated my project from 1 server to another and kept having problems with trying to run it. I kept keeping blank pages, and no errors in the log of CodeIgniter. Meanwhile it worked fine on the old server.

So I looked a bit deeper in error logs and found this:
Code:
Got error 'PHP message: PHP Fatal error:  Uncaught Error: Object of class Config\\Paths could not be converted to string

In index I found that the actual line was line 16 and that contains this:
Code:
$pathsPath = FCPATH . '../app/Config/Paths.php';

I found out that new projects have it changed to
Code:
$pathsPath = realpath(FCPATH . '../app/Config/Paths.php');

So I'm just curious... Why did it worked before without realpath()? Both servers run Ubuntu 20.04 with PHP7.4-fpm. (although the older one was upgraded from 18.04)
Reply




Theme © iAndrew 2016 - Forum software by © MyBB