I've found a workaround, which involves modifying the is_cli() function inside the system/core/Common.php file:
PHP Code:
function is_cli()
{
//the old part was:
//return (PHP_SAPI === 'cli' OR defined('STDIN'));
//this will do the trick":
if( PHP_SAPI == 'cli' OR defined('STDIN') )
{
return TRUE;
}
if( empty($_SERVER['REMOTE_ADDR']) and !isset($_SERVER['HTTP_USER_AGENT']) and count($_SERVER['argv']) > 0)
{
return TRUE;
}
return FALSE;
}
I know I shouldn't modify any system files, but what other options do I have?