This one has me stumped. I have two Windows installations of PHP: 32-bit on a 32-bit OS, and 64-bit on a 64-bit OS. Both use Apache 2.2 (native architectures), and both load php as a module.
Then I have a console application (.Net), which outputs one line with stuff in it. Typically, it will output one word, like E_INVALID_CREDENTIALS, or S_SUCCESS, (custom codes), followed by a colon and random data.
I am using $e = exec("command") in PHP and parsing the output of $e. However, and I have tested this with a die($e) after the exec statement, if I use a mobile browser (iPod touch, or Android 2.2), the output of exec is just the first word and a colon, but if I use a desktop browser (Chrome, or Firefox), the output is the complete line as printed by the console application.
I have run the command manually, even printed the command PHP is executing, and I see no reason for truncated output.
Can anyone help me root out this problem?
Finally. After a few days of debugging, I realized that the username I was sending to the console application was capitalized for mobile browsers. And while a capitalized username did not throw an error, it failed in other, mysterious ways.I should have caught this earlier. Either way, this was an esoteric bug in the Console Application, and had nothing to do with PHP. I still blame the phones for capitalizing my username…