Can't write to /tmp with php, despite 777 permissions and no open_basedir value

前端 未结 4 1872
花落未央
花落未央 2020-12-29 02:16

I\'m trying to write a file to my /tmp directory (on an apache server) with the php fopen function, but it fails:

<         


        
4条回答
  •  执念已碎
    2020-12-29 03:05

    I had exactly the same problem. PHP reported no problem with opening file in /tmp/myoutputfile, but no file was in that path. Then I did

    find / -name "myoutputfile"
    

    and found it in /tmp/systemd-…/myoutputfile. I've found this article on Google.
    So, in my case, it was a Systemd and Apache Httpd combination. I hope this will help to someone.

提交回复
热议问题