![]() |
Unable CodeIgniter 4 Foundations Code Samples - Lonnie Ezell Book - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Unable CodeIgniter 4 Foundations Code Samples - Lonnie Ezell Book (/showthread.php?tid=78924) |
Unable CodeIgniter 4 Foundations Code Samples - Lonnie Ezell Book - Ahirsi - 03-28-2021 Hi I am unable to run the CodeIgniter 4 Foundations Code Samples by Lonnie Ezell. https://github.com/lonnieezell/ci4-foundations Here are the errors thrown when I run php spark serve: I tried to use the rest of the assets in the root folder above the project-01, project-2 folders but to no avail. Code: C:\xampp\htdocs\project1328>php spark serve RE: Unable CodeIgniter 4 Foundations Code Samples - Lonnie Ezell Book - InsiteFX - 03-28-2021 This has to be your settings with Composer etc; Because I manually install it and it runs just fine. Sounds like a Composer autoload problem. If you change the folder of the public folder to something else, you need to edit spark and tell it where the folder is. RE: Unable CodeIgniter 4 Foundations Code Samples - Lonnie Ezell Book - Ahirsi - 03-29-2021 (03-28-2021, 08:54 PM)InsiteFX Wrote: This has to be your settings with Composer etc; Because I manually install it and it runs just fine.Hi InsiteFX: 1. I downloaded the zip file. Unzipped the contents under c:\xampp\htdocs. 2. I cd to C:\xampp\htdocs\ci4-foundations-master\project-01 3. I typed php spark serve I am still getting the same errors. I have tried the other projects also. I am not messing with Composer for this project. Simply download, unzip, cd to project folder and run php spark serve. Please let me know how you got yours to work. Best regards AHirsi RE: Unable CodeIgniter 4 Foundations Code Samples - Lonnie Ezell Book - InsiteFX - 03-29-2021 I also use xampp but I use vhosts, I just created a new project called ci4foundations and set the root path to that. I setup my localhost in windows hosts like found.local but you can use localhost. I only use spark for configuring things etc; RE: Unable CodeIgniter 4 Foundations Code Samples - Lonnie Ezell Book - craig - 03-29-2021 You will need to use Composer to install the CodeIgniter 4 framework for the example projects; the repository doesn't include it. RE: Unable CodeIgniter 4 Foundations Code Samples - Lonnie Ezell Book - danger89 - 01-30-2023 In my case I tried to upgrade my CI setup, and all files I didn't adapt I thought I could easily copy them to retrieve the latest file. Like: Code: cp vendor/codeigniter4/framework/app/Config/Constants.php ./app/Config/ However, I did the same for the app/Config/Paths.php file, but that resulted in your error message as well. Bottom-line: don't try to replace the Paths.php file from upstream. And the $systemDirectory variable in Paths.php should look like this: PHP Code: public $systemDirectory = __DIR__ . '/../../vendor/codeigniter4/framework/system'; RE: Unable CodeIgniter 4 Foundations Code Samples - Lonnie Ezell Book - kenjis - 01-30-2023 It seem the sample code needs PHP 7.3. Code: $ git clone [email protected]:lonnieezell/ci4-foundations.git Worked with PHP 7.3.33. RE: Unable CodeIgniter 4 Foundations Code Samples - Lonnie Ezell Book - kilishan - 01-30-2023 @kenjis has it right. I believe the biggest missing step, though, was that it required composer-based install to get the dependencies, like the framework itself, loaded. |