I have a really puzzling problem: I am writing a PHP CLI application running on a debian server. I am connected to the server via SSH, just the normal way. Everything runs as usual. Except the following:
echo "My CLI fun\n\n";
echo "Is this.";
Outputs on the SSH terminal, when executing the PHP script:
My CLI funIs this.
I am really puzzled as I have never had such a problem. The bash behaves normal in all other aspects. I already tried to output chr(10) and such, same problem.
Does anybody have a clue?
Solved. Sorry for wasting your time. The problem was that the php script was passed through a bash script that called it.
So, for people with the same problem: bash scripts seem to filter the output in some strange ways! Try calling the php script directly.