1

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?

mohammad falahat
  • 757
  • 1
  • 4
  • 11

1 Answers1

1

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.

Nazareno Lorenzo
  • 1,069
  • 2
  • 14
  • 25