Alarion Posted March 13, 2009 Share Posted March 13, 2009 This feature will probably only applies to a very minor customer population (maybe even just me) but, my WHMCS installation is hosted with Mosso.com. This is a cloud service. The way the servers are configured, the client IP that is reported by WHMCS when ordering and logging in and such, is *not* the real users IP. Instead, it is the IP of either a load balancer or some other server on the Mosso.com network. I have attached a screenshot showing the difference using the PHPInfo tool inside WHMCS. Is there a way to change this now, or would it require new code (probably new code, huh)? 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted March 14, 2009 Share Posted March 14, 2009 you should be asking mosso (now rackspace) to fix their proxying bug 0 Quote Link to comment Share on other sites More sharing options...
brianoz Posted March 16, 2009 Share Posted March 16, 2009 That's standard for forwarded IPs; if WHMCS doesn't handle that it's not handling proxying correctly, and that could be considered a bug. REMOTE_ADDR is only valid if a proxy is not involved in the chain. Here's a code fragment I found that explains what I mean a little more completely: if ($_SERVER["HTTP_X_FORWARDED_FOR"]) { if ($_SERVER["HTTP_CLIENT_IP"]) { $proxy = $_SERVER["HTTP_CLIENT_IP"]; } else { $proxy = $_SERVER["REMOTE_ADDR"]; } $ip = $_SERVER["HTTP_X_FORWARDED_FOR"]; } else { if ($_SERVER["HTTP_CLIENT_IP"]) { $ip = $_SERVER["HTTP_CLIENT_IP"]; } else { $ip = $_SERVER["REMOTE_ADDR"]; } } (I'm not 100% sure about whether the HTTP_CLIENT_IP code should be included, but the rest is correct) 0 Quote Link to comment Share on other sites More sharing options...
inventics Posted May 14, 2009 Share Posted May 14, 2009 Does anyone know a solution for the Mosso problem? 0 Quote Link to comment Share on other sites More sharing options...
gr2 Posted July 12, 2009 Share Posted July 12, 2009 use a cloud server for your whmcs installation instead of cloudsites. otherwise you will run into all sorts of issues. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.