I am trying to write a php file to process a form submission.
Here is the code I have so far:
<?php
define('_JEXEC', 1);
if (file_exists(dirname(__FILE__) . '/defines.php')) {
include_once dirname(__FILE__) . '/defines.php';
}
if (!defined('_JDEFINES')) {
define('JPATH_BASE', dirname(__FILE__));
require_once JPATH_BASE.'/includes/defines.php';
}
require_once JPATH_BASE.'/includes/framework.php';
//The following two files do not exist in my Joomla installation, is that normal?
//require_once JPATH_BASE.'/includes/helper.php';
//require_once JPATH_BASE.'/includes/toolbar.php';
//This here is throwing an exception
$app = JFactory::getApplication();
//$app->redirect('another page in my site');
?>
I am getting the following error:
Error displaying the error page: Application Instantiation Error: Application Instantiation Error
Every other page in the website is working correctly, I have checked the configuration file and all the database settings are there.
I also tried repairing the DB through joomla back end and through phpmyadmin and that didn't change anything.
any ideas what have I done wrong here?
Thank you