I have just upgraded from Joomla 3.10.8 to the latest version of Joomla 4 (it is 100% better). However some of my scripts that have run for years now no longer work. The scripts basically import files that arrive via FTP. I have a cron job that worked up until the upgrade which is this:
/usr/bin/wget -O /dev/null "https://mysite.com/run/myscript.php" > /dev/null 2>&1
When I run the script in the browser with error reporting switched on here is the result:
in /home/mysite/public_html/libraries/src/Factory.php (line 138)
*/ public static function getApplication()
{
if (!self::$application)
{
throw new \Exception('Failed to start application', 500);
}
return self::$application;
}
And also this:
Factory::getApplication('site') in /home/mysite/public_html/blm/script_blm.php (line 24)
require_once JPATH_BASE . '/includes/framework.php';
require_once(JPATH_ROOT.DS."components".DS."com_osproperty".DS."helpers".DS."helper.php");
require_once JPATH_BASE.DS.'administrator'.DS.'components'.DS.'com_osproperty'.DS.'classes'.DS.'xml.php';
require_once(JPATH_BASE.DS."administrator".DS."components".DS."com_osproperty".DS."classes".DS."property.php");
require_once(JPATH_BASE.DS."administrator".DS."components".DS."com_osproperty".DS."helpers".DS."images.php");
JFactory::getApplication('site');
ini_set('max_execution_time', 100);
ini_set('display_errors',1);
error_reporting(E_ALL);
define('AMDEBUG',0);
define('IMGPATH',0);
And in the Stack trace it says:
Exception:
Failed to start application
at /home/mysite/public_html/libraries/src/Factory.php:138
at Joomla\CMS\Factory::getApplication('site')
(/home/mysite/public_html/run/myscript.php:24)
Would anyone know why it would suddenly stop working and what these errors actually mean?