I am trying to make connection to my data base but i am getting error JFactory class not found /var/www/joomla2.5/database.php my code is
$db= JFactory::getDBO();
I have also tried to make database connection externally but then iam getting the error JDatabase class not found
<?php
$option = array(); //prevent problems
$option['driver'] = 'mysql';
$option['host'] = 'localhost';
$option['user'] = 'xxxx';
$option['password'] = 'xxxx';
$option['database'] = 'xxxx';
$option['prefix'] = 'cdri_';
$db = & JDatabase::getInstance( $option );
?>
I have checked my factory.php file it has a abstract JFactory class defined.
I am using joomla2.5 and Ubuntu12.04 OS
need help...