Answer the question
In order to leave comments, you need to log in
How not to wait for the response of a console command when running it from php?
Good afternoon
, an ajax request is sent from the page, a command is launched from php on the server side, let it be ping
exec('ping 1.1.1.1 -c 100 >buffer &');
The plan is to read the command output file line by line using ajax and give it to the user. But despite the fact that at the end of the command is '&'. all the same, php waits for the command to complete and 'freezes' for that time. How to win it? I'm not a big expert in linux
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question