Can't get CI4 to run :| |
Not new to CI - built many apps on CI3 but felt this was a new project and time to update to CI4.
I'm using composer to manage dependencies, and have everything running locally, using the appstarter route, and spark runs fine. Remotely, all I get is 500 errors. Remote server is ubuntu 18.04, apache, php 7.4. Intl php ext has been enabled. Filestructure (contents of /var/www/html/<folder>/): Code: drwxrwxr-x 4 www-data www-data 4096 Sep 15 15:10 . VHost setup: Code: <VirtualHost *:80> Error reported in apache error log: Code: [Tue Sep 15 15:53:21.388692 2020] [php7:error] [pid 28090] [client 81.133.41.50:56521] PHP Fatal error: require(): Failed opening required '/var/www/html/<folder>/project-root/app/Config/../../vendor/codeigniter4/framework/system/bootstrap.php' (include_path='.:/usr/share/php') in /var/www/html/<folder>/project-root/public/index.php on line 36 This seems to indicate that the VHost setup is at least working, in that when the domain url is hit it's getting through to CI, but CI then falls over for reasons, and I'm at a loss, since the bootstrap.php file is where it's failing to be found.
Try adding this to your vhost not sure if that is your problem but worth the try.
Code: ServerName http://www.Your_server.com What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Dear lord, after losing an afternoon to this and finally posting to ask for help, I solved my own problem. Hopefully this might help someone else...
The issue was that the vendor folder was being put by composer at the root of the <folder>, NOT inside the project-root folder. Doh. By adding the following you can explicitly tell composer where to locate the vendor folder, and then all was well with the world: Code: "config": {
Can you check your Config\Paths file? It seems to me that the path to your system directory is not correctly set.
|
Welcome Guest, Not a member yet? Register Sign In |