• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable CodeIgniter 4 Foundations Code Samples - Lonnie Ezell Book

#1
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
PHP Warning:  require(C:\xampp\htdocs\project1328\app\Config/../../../vendor/codeigniter4/framework/system/bootstrap.php): failed to open stream: No such file or directory in C:\xampp\htdocs\project1328\spark on line 44

Warning: require(C:\xampp\htdocs\project1328\app\Config/../../../vendor/codeigniter4/framework/system/bootstrap.php): failed to open stream: No such file or directory in C:\xampp\htdocs\project1328\spark on line 44
PHP Fatal error:  require(): Failed opening required 'C:\xampp\htdocs\project1328\app\Config/../../../vendor/codeigniter4/framework/system/bootstrap.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\project1328\spark on line 44

Fatal error: require(): Failed opening required 'C:\xampp\htdocs\project1328\app\Config/../../../vendor/codeigniter4/framework/system/bootstrap.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\project1328\spark on line 44
Reply

#2
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.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#3
(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.

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

#4
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;
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#5
You will need to use Composer to install the CodeIgniter 4 framework for the example projects; the repository doesn't include it.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.