Problems with login to codeigniter after switching windows to ubuntu

1

I'm in trouble, I created a codeigniter application in my localhost, had the windows 10 operating system installed and used the Wamp Server installed, but I formatted my computer and installed ubuntu linux as an operating system and installed Xampp on the machine , but now I can not log in to the application, I tested the models and controllers to see and everything is right, in the tests via which the authentication of the email and password is returning the user usually but not adding to the session.

Follow the controller code (Login.php):

class Login extends CI_Controller {

    function index() {
        if($this->session->userdata('isLoggedIn')) {
            redirect('/painel/acesso');
        } else {
            $this->show_login();
        }
    }

    function login_user() {

    $this->load->model('Login_model');

    $email = $this->input->post('email');
    $password  = sha1($this->input->post('password'));

        $usuario = $this->Login_model->logar($email, $password);

        if($usuario){
            $this->session->set_userdata('isLoggedIn', $usuario);
            $this->session->set_flashdata('success','Login efetuado com sucesso, seja bem vindo.');
            redirect('/painel/acesso');

        }else{
            $this->session->set_flashdata('error','E-mail ou senha invalidas');
            redirect('/login');
        }
    }

Follow the model's code (Login_model.php):

class Login_model extends CI_Model {

    public function logar($email, $password){
        $this->db->where('email', $email);
        $this->db->where('password', $password);
        $usuario = $this->db->get('user')->row_array();
        return $usuario;
    }

}

OBS: Remembering that this error started when I migrated to Ubuntu

" is saving the session files in this folder, at least that's what I understand, in the / opt / lampp / temp / folder, files with a name similar to this are being saved: / p>

ci_session03d59bd3750fd71051bf4ad894e98a20

But I noticed that they are coming with the blocked signal, and it is not possible to read, unless I allow the terminal with sudo chmod -R 777 temp , so I can read, and the .get file that returns yes with the message of success: success | s: 43: "Login successful" , welcome. "But I do not understand why it is being blocked. >     

asked by anonymous 11.07.2017 / 01:52

0 answers