Hi! I've been struggling trying to figure out what's going on to my code.
I updated CI version of a application from 2x to the latest one available. This app uses tank_auth and grocery_crud. I'm aware that tank_auth is not fully compatible with CI 3x (there is no official updates to CI 3). About crud, I updated it to its latest version as well.
Finishing setting up CI and going through the Upgrading Documentation I went to test my application and here we go, it keeps me returning this error message:
Unable to locate the specified class: Session.php
My session config:
My autoload:
My Home class Controller:
Menu library:
I thought the problem could be the tank_auth library, so I removed it completely. The problem persisted.
In my Home Controller when I comment the lines:
I guess the problem is related with the Home class, but I can't figure it out.![Huh Huh]()
screen.jpg (Size: 56.84 KB / Downloads: 8)
I updated CI version of a application from 2x to the latest one available. This app uses tank_auth and grocery_crud. I'm aware that tank_auth is not fully compatible with CI 3x (there is no official updates to CI 3). About crud, I updated it to its latest version as well.
Finishing setting up CI and going through the Upgrading Documentation I went to test my application and here we go, it keeps me returning this error message:
Unable to locate the specified class: Session.php
My session config:
PHP Code:
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'ci_sessions_sas';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = 'ci_sessions_sas';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
My autoload:
PHP Code:
$autoload['drivers'] = array('session');
My Home class Controller:
PHP Code:
<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class Home extends MY_Controller {
public $data = array();
function __construct() {
parent::__construct();
$this->load->library('menu');
$menu = new menu();
$this->data['menu'] = $menu->getMenu();
}
public function index() {
$this->data['user'] = $this->session->userdata('username');
$this->data['slug'] = 'home';
$this->load->view('layout', $this->data);
}
}
Menu library:
PHP Code:
<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class Menu extends MY_Controller{
function __construct() {
parent::__construct();
$this->load->model('menu_model', 'menu');
}
public function getMenu() {
$menu = array();
$model = new Menu_model();
$perfil = $this->getPerfilUser();
$modulos = $model->getModulos($perfil);
$funcoes = $model->getFuncoes($perfil);
for ($i = 0; $i < sizeof($modulos); $i++) {
$menu[$i]['nome'] = $modulos[$i]['modulo_nome'];
for ($j = 0; $j < sizeof($funcoes); $j++) {
if ($menu[$i]['nome'] == $funcoes[$j]['modulo_nome']) {
$menu[$i]['funcoes'][$j] = $funcoes[$j];
}
}
}
return $menu;
}
function getPerfilUser() {
//return $this->session->userdata['user_id_perfil'];
}
function getIdUser() {
//return $this->session->userdata['user_id'];
}
function exibirMenu() {
echo '<pre>';
print_r($this->getMenu());
echo '</pre>';
}
}
I thought the problem could be the tank_auth library, so I removed it completely. The problem persisted.
In my Home Controller when I comment the lines:
PHP Code:
$this->load->library('menu');
$menu = new menu();
$this->data['menu'] = $menu->getMenu();
I guess the problem is related with the Home class, but I can't figure it out.

screen.jpg (Size: 56.84 KB / Downloads: 8)