doulin9679 2011-08-10 21:02
浏览 56
已采纳

如果使用移动浏览器,exec的输出不同

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?

  • 写回答

2条回答 默认 最新

  • donglou8371 2011-08-13 19:15
    关注

    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...

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 r语言神经网络自变量重要性分析
  • ¥15 基于双目测规则物体尺寸
  • ¥15 wegame打不开英雄联盟
  • ¥15 公司的电脑,win10系统自带远程协助,访问家里个人电脑,提示出现内部错误,各种常规的设置都已经尝试,感觉公司对此功能进行了限制(我们是集团公司)
  • ¥15 救!ENVI5.6深度学习初始化模型报错怎么办?
  • ¥30 eclipse开启服务后,网页无法打开
  • ¥30 雷达辐射源信号参考模型
  • ¥15 html+css+js如何实现这样子的效果?
  • ¥15 STM32单片机自主设计
  • ¥15 如何在node.js中或者java中给wav格式的音频编码成sil格式呢