On 14-07-25 02:16 PM, Lester Caine wrote:
Not exactly a PHP problem, but a number of my sites are now being plagued by the fallout from it. gethostbyaddr($_SERVER["REMOTE_ADDR"]); Has worked perfectly for many years now, so I know exactly which Desk or Counter is trying to log in, and I can direct announcements to the correct location. Some of you will already have spotted the current problem ... VDI ... This reports a host name based on the VDI desktop accessed from the 'farm' which whilst irritating since one has to keep changing it each day, is actually changing even during a 'session' so a caller ticket is accessed, and can take over an hour at times to deal with, by which time the VDI number has changed, and you can't clear the ticket :( We can switch to manually specifying the location as part of the login process, butit's all to easy to select the wrong Desk especially if you were working on an adjacent one a previous day. To my way of thinking, the IP address should be for the physical machine that we are working with? So if the MAC address has an IP address locked to that machine then I should be able to simply drop back to that and ignore the host name? But I'm being told that $_SERVER["REMOTE_ADDR"] may not be the local IP address? Anybody got some insight into how we can get around this problem? My particular beef with the way things are currently being run is that the networ team seem to have no idea in the case of a suspicious access attempt even which building the offender is located let alone what desk, and I can't believe that is acceptable security practice?
Is this a proxy issue? If so, have you tried: HTTP_X_FORWARDED_FOR and then fall back on REMOTE_ADDR if it isn't set?
Cheers, Rob. -- Phone: 613-822-9060 +++ Cell: 613-600-2836 E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php