Smashed my head against an issue i have with php fopen(). It works on my test server, but doesn't on my production. I have CentOS 7 on production.
<?php
ini_set('display_errors', 'On');
error_reporting(E_ALL);
echo "starting\n";
$fh = fopen("/tmp/testwrite", "w") or die("can't open file for writing");
$bytes = fwrite($fh, "test line") or die("can't write");
echo "$bytes are written to " . realpath("/tmp/testwrite");
sleep(1);
fclose($fh) or die("can't close");
echo "file closed";
No error is thrown, all lines are in the output, but no file is created in /tmp folder on a server.
Any ideas? Thank you