* @throws \Exception
*/
public static function getApplication()
{
if (!self::$application) {
throw new \Exception('Failed to start application', 500);
}
return self::$application;
}
///require_once ( JPATH_BASE .DS. 'includes' .DS. 'defines.php' );
///require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
////////////$mainframe = JFactory::getApplication('site'); // comment out after joomla4 migration
////////////$app = JFactory::getApplication(); // comment out after joomla4 migration
echo "<br>DEBUG: inside " . __FILE__ . " line " . __LINE__ . " set mainframe";
$mainframe = Factory::getApplication('site'); // attempt after joomla4 migration
/* echo "<br>DEBUG: inside " . __FILE__ . " line " . __LINE__ . " SKIPPED mainframe"; */
/* echo "<br>DEBUG: inside " . __FILE__ . " line " . __LINE__ . " try adjusted mainframe";
$mainframe = Factory::getApplication(); // attempt after joomla4 migration -- without parsing 'site' */
echo "<br>DEBUG: inside " . __FILE__ . " line " . __LINE__ . " set app";
$app = Factory::getApplication(); // attempt after joomla4 migration
<?php
// teamforms.php
/// must be before header
include "includes/session.php"; // access joomla login
$ifadmin = ($my->usertype == 'Administrator' || $my->usertype == 'Super Administrator' );
/// init variables ///
$script_version = $parent_version = "021f4-008g1" ; // 20240204
$script_name = basename(__FILE__);
Exception
|
---|
Exception: Failed to start application at /home/usbf/public_html/libraries/src/Factory.php:158 at Joomla\CMS\Factory::getApplication('site') (/home/usbf/public_html/apps/includes/session.php:51) at include('/home/usbf/public_html/apps/includes/session.php') (/home/usbf/public_html/apps/teamforms.php:5) |