#922 - Cannot validate license
We have just installed a 30 day trial of SugarChimp on our SugarCRM installation (v6.5.17) but are unable to validate our evaluation license. After entering the key and clicking validate, a JavaScript alert pops up saying "Error: null".
Looking at the PHP error log, the problem is:
[10-Nov-2014 12:15:42] PHP Fatal error: require(): Cannot redeclare class configurator in /chroot/home/cecloudo/cecloud.org.uk/html/systems/crm/modules/SugarChimp/license/OutfittersLicense.php on line 125
10 years ago
Hi Tim, thanks for reaching out. I can see how this may be happening in the SugarChimp code, but it shouldn't be breaking unless you're using an old version of PHP.
Do you know what version of PHP your server is running?
I went ahead and patched the code. You can go to your orders and grab the latest. Simply install it over the current version of SugarChimp in Module Loader. If you're not using at least PHP 5.3, you'll run into other issues along the way.
Let me know how it goes. Thanks!
10 years ago
Thanks for the quick response.
We're running PHP 5.3.3 and using APC for opcode caching, could APC be the problem?
I've installed the latest version (7.1.1g), and now I'm getting a different error:
Hopefully this one should be a bit easier to fix.
Thanks again!
10 years ago
Great, thanks!
SugarChimp will need to be able to access the SugarOutfitters' and MailChimp's servers for the integration to work. Is this system behind a firewall?
One way to test this would be to ssh into your server and run something like "curl https://www.sugaroutfitters.com" and see if it is able to reach our servers.
10 years ago
Hi there. We are able to reach your server just fine using the method you described above, however this error still persists. There is no firewall blocking, nor is there a problem with SSL certs. Any other ideas as to how to fix?
Many thanks
10 years ago
Using curl seems to work fine so it can't be the firewall.
Looking through the SugarCRM log we noticed another message:
We're using SugarCRM Community Edition which doesn't have this file, maybe this is the issue?
Thanks once again for your help, I hp[e we can get this resolved soon!
10 years ago
Okay, we managed to fix this by modifying your plugin a little bit.
It seems to be a scoping issue that relates to how the $outfitters_config variable is declared. By including "global $outfitters_config" before declaration in config.php and then after including config.php in OutfittersLicense.php (multiple instances) it validated fine.
I don't know why this is happening if this (presumably) used to work fine unless PHP fundamentally changed something in one of the 5.3 releases - I don't do enough PHP dev to say for sure.
Would be interesting to hear your thoughts on this in case there's a knock-on effect that may affect the rest of the installation.
10 years ago
Glad you were able to get it working! The config array is included in each of the methods the array is used, so scoping should not have cause this issue, but obviously something related to that did keep it from working.
We've never run into this issue in the past, so it's hard to know exactly why that would fix the problem. The only thing I can think of is maybe some sort of setting in your php.ini that might dictate how global variables work.
I'm going to close this case. Let me know if you need anything else. Thanks!