linux - No stdout when php process is spawned in the background
I'm having issues writing to file on one of my servers(rhel6) from php, i don't seem to get any stdout when i start it as a background process.
- php x.php > x.log - works just fine
php x.php > x.log & - outputfile created but is empty
echo asd > x.log & - produce an outputfile
<?php echo 'asd';
This issue only affect one out of the three servers i've tried this on, the php version is 5.3.3 on the affected server(rhel6), and the other two servers(rhel7 / centos7) run php version 5.4.16.
Further testing : fwrite from php would not create the file when its launched in the background given full path, doing it in the foreground will gives the expected results.