Reputation: 748
I have a PHP file that always listens to a socket, I must have a tab opened in my browser to execute that file, Is there a way to define some PHP files to apache to execute automatically when apache starts?
Upvotes: 1
Views: 53
Reputation: 1079
I would recommend you to check this article: http://webadvent.org/2009/daemonize-your-php-by-sean-coates
It recommends to install supervisord
to make sure that one instance of your php script is running. It's something that you would make frequently when working with async job queues.
Upvotes: 1