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?

2
  • Heard of cron jobs..? stackoverflow.com/questions/18737407/… Commented Dec 18, 2014 at 5:39
  • I want to run just one time when apache starts, it has a while and it doesn't need to run periodical with cron jobs @웃웃웃웃웃 Commented Dec 18, 2014 at 5:47

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.