Page 1 of 1

SOLVED: PHP file_put_contents not writing to /tmp

Posted: Sun May 06, 2018 8:22 pm
by chris
I have a php script that writes to /tmp directory

Code: Select all

file_put_contents('/tmp/file.tmp',$value);
But it doesn't write, I can't find the files.
I also don't get errors (php or in apache)

Anyone got any ideas ?

Re: PHP file_put_contents not writing to /tmp

Posted: Mon May 07, 2018 6:17 pm
by chris
Found the solution:

Apache/php now create a directory in /imp which hold the /tmp/file.tmp

Code: Select all

/tmp/systemd-private-9b5e7c68bxxx45faa1a812b5df02f1ab-apache2.service-5ExxRI/tmp/
So it doesn't write directly to /tmp.
Makes it more difficult to read it by another script :-(