Apologies for digging up this old thread.
I was wondering if the OP found a solution?
I was stuck in EXACTLY the same position and the solution was quite strange. All I did was to ensure that test.php was saved
without the Byte Order Mark. For those who don't know, the BOM allows applications to know what the encoding of the file is. You can read all about it
here
Software like notepad++ (free) make it very easy to save a file without the BOM.