I\'m trying to write a file to my /tmp directory (on an apache server) with the php fopen function, but it fails:
<
Your problem is likely caused by the combination of systemd and apache. It's a security feature called PrivateTmp, and obviously it's an opt out.
If you don't want it, you can disable it like this:
/etc/systemd/system/multi-user.target.wants/apache2.service
:
#PrivateTmp=true
sudo systemctl daemon-reload
sudo systemctl restart apache2