Jump to content

PHP CLI as daemon...


aximbigfan

Recommended Posts

Hi,

 

I have a PHP script that listens to connections to a socket it creates, then responds to them. This script needs to actually act as a server though, which means it must run in the background somehow, just like any other process would run in the background.

 

Any ideas?

 

Thanks,

Chris

Link to comment
https://forums.phpfreaks.com/topic/120945-php-cli-as-daemon/
Share on other sites

very bad idea i thought this would be a good idea but if you look at your CPU usage while the script is running you will see php runs at 100%(or as close to that as it can get) so your cpu will forever be at 100% for the rest of it's life (assuming you want to run it full time)

 

Scott.

Link to comment
https://forums.phpfreaks.com/topic/120945-php-cli-as-daemon/#findComment-623461
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.