Answer the question
In order to leave comments, you need to log in
How to start script execution from PHP?
The essence of the problem. There is a site that, with certain actions, should call scripts. For example. The text is placed on the site and an external script processes it. Because Since this processing can be long, it is unreasonable to perform it as part of the text upload to the site.
One of the options was to run scripts by cron. Another option is to write a demon and pull it, for example, by sending data through sockets. But here is another problem. Texts are not posted very often, and a constantly running demon would eat up RAM on a cheap VDS.
At the moment, I used the inetd daemon, which passes data received on a specific port to a C program, which in turn parses the command and runs the desired script. On the plus side, apart from the little inetd, most of the time no one has RAM.
Question. How well is the problem solved? And maybe there are easier ways to solve the problem?
Answer the question
In order to leave comments, you need to log in
At the moment, I used the inetd daemon, which passes data received on a specific port to a C program, which in turn parses the command and runs the desired script.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question