You said:
I check my by creating a php file with (<?php echo realpath('robots.txt'); ?>) and when run in browser it returns full path just fine.
And here's your false assumption. You run it through the browser, not through a CRON job. The CRON job (which uses a CLI version of PHP) and access through the web use different binaries of PHP with different configurations and different behaviours. That's what I was trying to say in so many words on the other ticket.
That said, there's something you can do. Open the cli/admintools-filescanner.php file in a plain text browser. Find the text between the lines:
define('DS', DIRECTORY_SEPARATOR);
and
class AdminToolsFAM extends JApplicationCli
and replace them with
define('DS', DIRECTORY_SEPARATOR);
// Load system defines
if (file_exists(dirname(__FILE__).'/defines.php')) {
require_once dirname(__FILE__).'/defines.php';
}
if (!defined('_JDEFINES')) {
define('JPATH_BASE', dirname(__FILE__).'/../');
require_once JPATH_BASE.'/includes/defines.php';
}
// Load the rest of the necessary files
include_once JPATH_LIBRARIES.'/import.php';
// Load the rest of the necessary files
include_once JPATH_LIBRARIES.'/import.php';
if(file_exists(JPATH_BASE.'/includes/version.php')) {
require_once JPATH_BASE.'/includes/version.php';
} else {
require_once JPATH_LIBRARIES.'/cms.php';
}
JLoader::import( 'joomla.application.cli' );
class AdminToolsFAM extends JApplicationCli
This eliminates realpath() use. If you have exactly the same problem as the other ticket that should help.
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!