For some time now I have been working with Joomla, and now I am working with a version 3.1.5. I often make my own PHP scripts to use for AJAX callbacks and other things. I put them in a folder called scripts
which isn't part of the normal Joomla installation.
Because of this I have to use some configuration code to get the scripts to work well when accessing them from Joomla. I use this code:
define( '_JEXEC', 1 );
define('JPATH_BASE', dirname(dirname(__FILE__)));
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
/* Create the Application */
$mainframe = JFactory::getApplication('site');
Recently I am trying to call this script for AJAX and I am getting this following error:
404 (Category not found)
The only reason I can think of for this is that Joomla things that the user doesn't have privileges to read the script because of some reason to do with a category? I am not sure, and I am looking for some help. I have created any categories for this Joomla installation and I don't use them.