vane41 Posted June 19, 2017 Share Posted June 19, 2017 Hi! I'm running WHMCS inside a container and passing the license key, db connection and all the other necessary info via environment variables. However, since upgrading the container image to use WHMCS v7.x.x I can no longer set licensed public ip in configuration.php. Here's a workaround that I've been using in whmcs v6: ... (configuration.php) ... if(getenv('LICENSED_PUBLIC_IP')) { $_SERVER['SERVER_ADDR'] = getenv('LICENSED_PUBLIC_IP'); } In v7 this results in an "INVALID LICENSE" error whenever I upgrade the container. It's because WHMCS uses container's internal IP address instead of the public IP given in the file above. I'd be grateful for any clues on how to solve this problem. Cheers 0 Quote Link to comment Share on other sites More sharing options...
bear Posted June 19, 2017 Share Posted June 19, 2017 Why should that even work? Wouldn't something like this allow the possibility of faking the actual installation is licensed (not saying you are)? I mean, if you can tell it what IP to use, what's to stop you doing that for more than one installation using a licensed IP... 0 Quote Link to comment Share on other sites More sharing options...
vane41 Posted June 19, 2017 Author Share Posted June 19, 2017 Running it inside a container is the main thing here. WHMCS takes the internal ip of the container that it is running in and treats it like the public address that would be used for accessing the panel from the Internet. The workaround for the containerized IP address that I posted worked fine on whmcs v6, and as far as I remember, whmcs support gave us this solution when we asked them about it. I mean, if you can tell it what IP to use, what's to stop you doing that for more than one installation using a licensed IP... Doesn't the address have to match with the license number? I assume (the obvious) that you cannot use a license for more than one installation, so I don't understand your concerns here. 0 Quote Link to comment Share on other sites More sharing options...
bear Posted June 19, 2017 Share Posted June 19, 2017 as far as I remember, whmcs support gave us this solution when we asked them about it. If they provided it, they must know about it so I withdraw the concern. Doesn't the address have to match with the license number? I assume (the obvious) that you cannot use a license for more than one installation, so I don't understand your concerns here. Just playing devil's advocate here, but let's say I create 5 containers. In each, I use a WHMCS installation with that same IP listed along with the key, etc. Unless there is some mechanism at their licensing server that would pick up on it, license A on IP A would work on *every* instance of that IP and license... Maybe. 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.