CodeIgniter Forums
Error after run php sprak serve - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forum-31.html)
+--- Thread: Error after run php sprak serve (/thread-76989.html)



Error after run php sprak serve - nguyentrongdev443 - 07-09-2020

Hello !

I after download code by composer. And in cmd, i write php sprak serve

And it display error

E:\codeigniter\lpb2b>php spark serve

Warning: require(E:\codeigniter\sample\app\Config/../../vendor/codeigniter4/codeigniter4/system/bootstrap.php): failed to open stream: No such file or directory in E:\codeigniter\sample\spark on line 44

Fatal error: require(): Failed opening required 'E:\codeigniter\sample\app\Config/../../vendor/codeigniter4/codeigniter4/system/bootstrap.php' (include_path='.;C:\php\pear') in E:\codeigniter\lpb2b\spark on line 44


How i will do run it

Thanks.


RE: Error after run php sprak serve - marcogmonteiro - 07-10-2020

Never really used codeigniter or any development tool on windows. From what I can see you have your spark file here E:\codeigniter\lpb2b but then your codeigniter framework is not in the same folder.


RE: Error after run php sprak serve - InsiteFX - 07-10-2020

It has to do with the spark path I ran into this also awhile back because all my stuff is under public_html
php spark is hard coded to the public folder I had to edit it and change it to public_html.

This is what I had to do

PHP Code:
// Path to the front controller
define('FCPATH'__DIR__ '/public' DIRECTORY_SEPARATOR); 

I Changed it to the below for my stuff:

PHP Code:
// Path to the front controller
define('FCPATH'__DIR__ '/public_html' DIRECTORY_SEPARATOR);