CodeIgniter Forums
php spark serve auto cancel issue - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: php spark serve auto cancel issue (/showthread.php?tid=81850)



php spark serve auto cancel issue - Dasuccess - 05-10-2022


Guys i need help here on Php Spark serve

PS C:\xampp\htdocs\project> php spark serve

CodeIgniter v4.1.9 Command Line Tool - Server Time: 2022-05-10 05:36:38 UTC-05:00

CodeIgniter development server started on http://localhost:8080
Press Control-C to stop.

PS C:\xampp\htdocs\project>

The problem here is that , it loads the server but it automatically cancel by itself and server will stop working


RE: php spark serve auto cancel issue - datamweb - 05-11-2022

Hi, First run the following command.
Code:
php spark serve --port 8181
Do you still have problems?
I was using xampp, this problem had happened to me before.
I suggest you installphp independently. Your problem may be solved.
There is a download link PHP.


RE: php spark serve auto cancel issue - Dasuccess - 05-11-2022

(05-11-2022, 01:00 AM)datamweb Wrote: Hi, First run the following command.
Code:
php spark serve --port 8181
Do you still have problems?
I was using xampp, this problem had happened to me before.
I suggest you installphp independently. Your problem may be solved.
There is a download link PHP.

Thank you. 
I figured it out, the solution was i had an antivirus blocking the execution of the command thats why it auto cancel by itself, but immediately i deactivated the antivirus, everything is working fine now. 

Thanks alot i appreciate


RE: php spark serve auto cancel issue - captain-sensible - 05-11-2022

i don't understand why you would want to use spark if you have xampp.

Basically a web server like apache , recognises php does the stuff it needs to do and then renders the content along with static html .

My understanding of spark was that, like the php built in server , you would aim to use it as a sort of embedded server, so you could play with wen apps on say your Desktop

So basically if you have things set up and xampp is running it should server up content , via localhost port 8080 or 80.
if you stick a couple of html files in the web root of xampp you should be able to see that , if xampp is running.



if you use sqlite as a database then you can even put your CI4 project onto your Desktop, from a terminal or whatever you call it in windows "cd" into web app and run :
Code:
php spark serve
then you should have something that is a fully contained running web app.


RE: php spark serve auto cancel issue - Dasuccess - 05-11-2022

Thank you.
I figured it out, the solution was i had an antivirus blocking the execution of the command thats why it auto cancel by itself, but immediately i deactivated the antivirus, everything is working fine now.

Thanks alot i appreciate