<?php
define('_JEXEC', 1);
define('JPATH_BASE', __DIR__);
require_once JPATH_BASE . '/includes/defines.php';
require_once JPATH_BASE . '/includes/framework.php';
require_once JPATH_BASE . '/plugins/authentication/joomla/src/Extension/Joomla.php';
require_once JPATH_BASE . '/plugins/authentication/cookie/src/Extension/Cookie.php';
$container = \Joomla\CMS\Factory::getContainer();
$container->alias('session.web', 'session.web.site')
->alias('session', 'session.web.site')
->alias('JSession', 'session.web.site')
->alias(\Joomla\CMS\Session\Session::class, 'session.web.site')
->alias(\Joomla\Session\Session::class, 'session.web.site')
->alias(\Joomla\Session\SessionInterface::class, 'session.web.site');
$app = $container->get(\Joomla\CMS\Application\SiteApplication::class);
\Joomla\CMS\Factory::$application = $app;
?>
This is my "connector" file for an external PHP APP, but it doesn't work in Joomla 5
I need a new connector file.
HELP!
P.D. Chat GPT doesn't gave me the solution
Thanks a lot.
define('_JEXEC', 1);
define('JPATH_BASE', __DIR__);
require_once JPATH_BASE . '/includes/defines.php';
require_once JPATH_BASE . '/includes/framework.php';
require_once JPATH_BASE . '/plugins/authentication/joomla/src/Extension/Joomla.php';
require_once JPATH_BASE . '/plugins/authentication/cookie/src/Extension/Cookie.php';
$container = \Joomla\CMS\Factory::getContainer();
$container->alias('session.web', 'session.web.site')
->alias('session', 'session.web.site')
->alias('JSession', 'session.web.site')
->alias(\Joomla\CMS\Session\Session::class, 'session.web.site')
->alias(\Joomla\Session\Session::class, 'session.web.site')
->alias(\Joomla\Session\SessionInterface::class, 'session.web.site');
$app = $container->get(\Joomla\CMS\Application\SiteApplication::class);
\Joomla\CMS\Factory::$application = $app;
?>
This is my "connector" file for an external PHP APP, but it doesn't work in Joomla 5
I need a new connector file.
HELP!
P.D. Chat GPT doesn't gave me the solution
Thanks a lot.
Statistics: Posted by BENKENOBI — Sun Dec 22, 2024 4:02 pm