I have my code that looks like this:
exec('php -f bg_post.php -- '.escapeshellarg($_POST["data"]).' 2> /dev/null &');
Because of bg_post.php being very lengthy, I want it to handle the script in the background and then send the user on their marry way after they submit. Only problem is, despite executing the script with exec, and then sending the output to /dev/null, it still wants to wait for the output. How can I fix this?