I am getting this issue as well and it doesn't matter which version of PHP I have installed. While I've had the above noted error a few times I'm usually getting a slight variation:
Fatal error: Illegal length modifier specified 'f' in s[np]printf call in /src/XF/Util/File.php on line 305.
I...