Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/22/2017 in all areas

  1. 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 , else if (isset(Configure::get('Blesta.company')->hostname)) { $data['domain'] = Configure::get('Blesta.company')->hostname; } 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] => )
    1 point
×
×
  • Create New...