Can I run a PHP CGI script as a background process using exec() ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could try it to start it as an linux background process using exec().
You could try this:
exec('/usr/bin/php /path/to/your/script.php &');The ‘&’ tell’s linux to start this command in the background.
Note: You lose control over your executed script at that point and it may not work with all hosts (especially shared host envoirements).