-1

Is there a way in PHP to find out if someone is connecting to my website from within a Windows Terminal Services/Citrix/RDP remote desktop environment?

My web application is experiencing some serious performance issues when (and ONLY when) someone is connecting to it using IE9 through a remote desktop connection. I know I should be looking for the cause of these problems and believe me I am. I found out however that switching to IE8 compatibilty-mode for some reason resolves the issues. So for the time being I would like to detect if someone is connecting to my website using IE9 through a remote desktop connection so I can then force IE8 compatibility-mode on them.

Any thoughts on why my web application is so much slower in a remote desktop IE9 are welcome as well. My web application is built on PHP/jQuery/jQueryUI/jqGrid/mySQL.

DForck42
  • 19,789
  • 13
  • 59
  • 84
Kirk Olson
  • 554
  • 8
  • 16
  • Have you tried fiddling with `$_SERVER` Globals? – samayo Apr 25 '13 at 19:00
  • I looked into those, couldn't figure out however which global gives me the info i'm looking for. Any thoughts on that? – Kirk Olson Apr 25 '13 at 19:03
  • I think this is off-topic for SO. I voted to migrate it to serverfault. – Mike Sherrill 'Cat Recall' Apr 25 '13 at 19:05
  • 1
    I *highly* doubt there is anyway to detect this. Also, is this really a problem you need to fix? If they use RDP and it's broken, I don't think that your issue. – gen_Eric Apr 25 '13 at 19:05
  • 1
    @RocketHazmat - it SHOULDN'T be his problem, but if you're the sole developer at a company that has a lot of remote employees using remote connections, it tends to become your problem if they can't use your site - doesn't matter WHY they can't use it. – EmmyS Apr 25 '13 at 19:36
  • @EmmyS - You took the words right out of my mouth ;-) Thanx for understanding the loneliness of the long-distance developer! – Kirk Olson Apr 25 '13 at 20:05
  • 1
    @KirkOlson - believe me, I've been there, and no amount of talking will convince people that it's not really your fault. They can't access the website, so it must be the web developer's fault. – EmmyS Apr 25 '13 at 20:06

2 Answers2

3

There is nothing in PHP, HTTP, HTML, the DOM, or even browser DOM extensions to know if you're running under a Terminal Services session.

The only way is to use an ActiveX control or .NET applet to query Win32 directly. In C#/.NET you can use System.Windows.Forms.SystemInformation.TerminalServerSession, and then return that information to the server, but you can only do this after the page has loaded.

This probably is an issue with IE9's improved Hardware Accelerated Rendering feature because Terminal Services uses the virtual rdpdd display driver. Try disabling this option in IE on the terminal server.

Dai
  • 141,631
  • 28
  • 261
  • 374
0

Remote Desktop users are using the browser as setup inside the host ( server , or citrix ) app. The server admin can define options like browser settings ( enhanced security settings of IE ) Virus scanner integration

and also what browser is available ( IE 7-8-9-10 ). Those browser act different in there rendering

The IE-XXX compatibilty-mode are controllable by your application http://msdn.microsoft.com/library/cc817574.aspx

Per Page:

<meta http-equiv="X-UA-Compatible" content="IE=8"/> 

The page will be always rendered in “IE8 Standards mode” even when no “!DOCTYPE” is existing in html

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9"/> 

The page will be always rendered in “IE9 Standards mode” even when no “!DOCTYPE” is existing in html

<meta http-equiv="X-UA-Compatible" content="IE=9"/> 

The page will be always rendered in “IE9 Standards mode” even when no “!DOCTYPE” is existing in html

<meta http-equiv="X-UA-Compatible" content="IE=edge"/> 

At this configuration the highest available version of the IE rendering engine will be used . It does not care if a “!DOCTYPE” was used or not. this function is comparable with “IE=7” and “IE=8”. This is used to be compatible with the highest IE version.

So i think you do not need to care about RDP or Citrix Hosts but to support the using IE in the right mode.

grzchr15
  • 283
  • 1
  • 6