I have a Joomla 3 site, and under that site but not within the Joomla framework, I'm doing all of my coding. Most of the functionality I'm providing with jQuery AJAX calls. In the PHP scripts used, I'm loading the Joomla framework which is OK but... loading the session is another matter!
I've done heaps of research, and the closest I get is that I could do it if I used the Joomla AJAX calling mechanism. I've been trying to avoid this, mainly because I've never peeked under the hood, and its a whole new "thing" to learn. It also binds my code forever to Joomla.
I'm loading the framework like this:
$joomlaBase = dirname(dirname(dirname(__FILE__)));
if (! defined('_JEXEC')) {
define( '_JEXEC', 1 );
define('JPATH_BASE', $joomlaBase);
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
$mainframe =& JFactory::getApplication('administrator');
$mainframe->initialise();
}
But how to load the session?