We have a Ubuntu 16.04 Server hosting a php application.
One of the script (lots of calls to it throughout the day) has this on top:
$raw_input = file_get_contents('php://input');
We then proceed to deal with the $raw_input and return response to the client.
We never had any issues(or didn't realise) But recently the tmp directory gets filled up quickly in sizes of GB. Most of the files there are Php temporary files starts with "PHP......" taking 5-6MB. The contents are the request body to that script.
Is there a way to prevent the temporary files being created or delete it before the script finishes?
I have the same script in a staging environment but there is no such files in there but only on production.
We are using php7.1