yesterday we have found a issue with one of our licensed plugin, and after a deep look, we found the issue come from LicenseManager.php .
when the cron is running fro web, all thing is good, but when the cron are running from CLI, the issue is that the class can't determine the domain and the ip when it running from CLI . $_SERVER['SERVER_Name'] , $_SERVER['SERVER_ADDR'] and $_SERVER['LOCAL_ADDR'] global variables is only accessible when running through a browser . we have made a simple patch fro the license manager to get domain from blesta.company vars ,
Question
Blesta Addons
yesterday we have found a issue with one of our licensed plugin, and after a deep look, we found the issue come from LicenseManager.php .
when the cron is running fro web, all thing is good, but when the cron are running from CLI, the issue is that the class can't determine the domain and the ip when it running from CLI . $_SERVER['SERVER_Name'] , $_SERVER['SERVER_ADDR'] and $_SERVER['LOCAL_ADDR'] global variables is only accessible when running through a browser . we have made a simple patch fro the license manager to get domain from blesta.company vars ,
the same for ip we have added a patch to resolve the blesta compay, but after this fixe, the LicenseManager still return error for invalid location;
the cause is licensemanager send a wrong info when it run in CLI,
Array ( [status] => invalid_location [label] => XXXXXX Plugin [time] => 1498148289 [allow_reissue] => 1 [addons] => [version] => 4.0.1 [custom] => Array ( [license_type] => onetime [cancellation_date] => [license_for] => XXXXXX [addon_version] => 1.0.0 ) [domain] => Array ( [0] => XXXXX.com ) [ip] => Array ( [0] => XXX.165.XXXX.249 ) [path] => Array ( [0] => /home/XXXXXX/public_html/blesta/ ) [updates] =>
when we run it from web
Array ( [status] => valid [label] => XXXXXX [time] => 1498148277 [allow_reissue] => 1 [addons] => [version] => 4.0.1 [custom] => Array ( [license_type] => onetime [cancellation_date] => [license_for] => XXXXXX [addon_version] => 1.2.0 ) [domain] => Array ( [0] => XXXXX.com ) [ip] => Array ( [0] => XXX.165.XXX.249 ) [path] => Array ( [0] => /home/XXXXXX/public_html/blesta/ ) [updates] => )
5 answers to this question
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.