This topic is locked

PHPRunner and Joomla Integration

11/28/2013 7:26:31 AM
PHPRunner General questions
A
angelcause author

I am using PHPRunner 6.2 and Joomla 3.1.1 Stable, I have added the below given code in the Wrapper menu but I am getting a error as below :
Fatal error: Access denied for user ''@'localhost' to database 'req_vehicle' in C:\xampp2\htdocs\portal\vrequest\include\dbconnection.my.mysqli.php on line 16

define( '_JEXEC', 1 );

define( 'DS', DIRECTORY_SEPARATOR );
// change the following line to point to your Joomla 3.1 installation

define('JPATH_BASE', "c:\\xampp\\htdocs\\joomla31\\" );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );

require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
$mainframe = JFactory::getApplication('site');

$mainframe->initialise();
$user = JFactory::getUser();
if($user->id)

// log in

{
$_SESSION["UserID"] = $user->get("username");

$groups = $user->get('groups');

$_SESSION["GroupID"] = reset($groups);

$_SESSION["UserName"] = $user->get("name");

if ($user->get('isRoot'))

$_SESSION["AccessLevel"] = ACCESS_LEVEL_ADMINGROUP;

else

$_SESSION["AccessLevel"] = ACCESS_LEVEL_USER;
}

else

// log out

{

$_SESSION["UserID"] = "";

$_SESSION["AccessLevel"] = "";

$_SESSION["GroupID"] = "";

$_SESSION["UserName"] = "";

}
Sergey Kornilov admin 11/28/2013

I guess you didn't correct the path as follows:

// change the following line to point to your Joomla 3.1 installation

define('JPATH_BASE', "c:\\xampp\\htdocs\\joomla31\\" );