Config file throws error when a file is included

Config file throws error when a file is included

by Kehinde Adeoya -
Number of replies: 0

I have 2 projects, one Moodle, the other is the authentication project. I am using this second project to store user's DB config. This is trying to implement multi-tenancy. On the auth project, when a user logs in it fetches the database config and it is to pass it to the config.php file params. These params are stored as global sessions variables in the auth app. So I included the dashboard.php (from the auth app) file in the config.php (Moodle) thus. Once in inlcuded, and Moodle page refreshed, it returns error on the page. 

    $userloogedin = '/Applications/XAMPP/xamppfiles/htdocs/register/dashboard.php';
include( $userloogedin );

On the second project when I refreshed the page it returns error on the page. What could be the problem? Am I including it in a wrong way?


Average of ratings: -