svoorhees Posted August 24, 2011 Share Posted August 24, 2011 Hello, I have a script that was developed, and we integrated the WHMCS Licensing Addon to the scripts index.php, which is the primary program. From browser, the code runs fine and the licensing addon is functioning perfectly. However, if index.php is set up as a cron job, which most users will end up doing, the error "You have an invalid license key. Please make sure your license is current and you are using the exact license given to you." Again, it works fine in a browser (htttp://domain/path/index.php) but errors when running from cron. Any suggestions on what might be causing this failure? 0 Quote Link to comment Share on other sites More sharing options...
zstergios Posted July 4, 2012 Share Posted July 4, 2012 Via cronjob can not validate the "domain" so you should skip checking the domain part. this may works $domain=(isset($_SERVER['SERVER_NAME']))?$_SERVER['SERVER_NAME']:''; $validdomains = explode(",",$results["validdomain"]); if (!empty($domain) && !in_array($domain, $validdomains)) { $localkeyvalid = false; $localkeyresults["status"] = "Invalid"; $results = array(); } 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.