Hi,
I have setup cron as follows on my hosting to run hourly..
/usr/local/bin/php /home/antXXXX/public_html/oc-includes/osclass/cron.php
I am getting the following email from the host
ABS_PATH is not loaded. Direct access is not allowed.
Please advise how we can get this to run properly as it is not being run by server.
Our hosting provider believes this is PHP coding issue..
-- see below..
Hello ..
This is Alex Kr in Managed Hosting just following up. So I did a little more digging into the "ABS_PATH is not loaded. Direct access is not allowed." error. After a little more digging, this appears to be a variable that's defined in this PHP application and doesn't appear to be an environment variable that would defined for the user that runs that cron.php script. As far as I can tell, this variable is defined in the index.php file for this application. I'm not a PHP developer, but this excerpt from the head of that file, seems relevant:
define('ABS_PATH', str_replace('//', '/', str_replace('\\', '/', dirname($_SERVER['SCRIPT_FILENAME'])) . '/
'));
if(PHP_SAPI === 'cli') {
define('CLI', true);
}
require_once ABS_PATH . 'oc-load.php';
Based on how this variable appears to be defined, this looks to me like it's part of this "osclasspoin.com" PHP application and not necessarily an environment variable or something else that we would be responsible for on the server-side. At this point I'm going to recommend that you reach out to a PHP developer to assist you with troubleshooting this issue related to running that cron script. Unfortunately, this issue does appear to be outside of our scope as system administrators and more in the scope of a PHP developer.
Let me know if you have any questions, or if there's anything else that I can assist you with. Thank you!
Best Regards,
Alex Kr.