Php unit windows

Under windows there are currently a lot of failing tests.

Most problem is \n instead of \r\n.

Some of the problems are fixed with this PR.