Welcome Guest, Not a member yet? Register   Sign In
error lost session
#1

Hi, the session is lost from the in the app between method,  i do not why, i am working with CI 3.0.6 and php 5.6, my app is in https

autoload.php
PHP Code:
$autoload['libraries'] = array(
 
       'database',
 
       'encryption',
 
       'session',
 
       'Nusoap_lib',
 
       'MY_Encrypt',
 
       'zip',
 
       'upload',
 
       'Validar'
); 

config.php


PHP Code:
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'sessiones';
$config['sess_expiration'] = ini_get("session.cookie_lifetime");
$config['sess_save_path'] = sys_get_temp_dir();
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 86400;//300; en segundos
$config['sess_regenerate_destroy'] = FALSE;
$config['sess_encrypt_cookie'] = TRUE;

$config['cookie_prefix'   '';
$config['cookie_domain'   '';
$config['cookie_path'       '/';
$config['cookie_secure'   TRUE;
$config['cookie_httponly'    FALSE

class login.php:

PHP Code:
method 1:
...

if (
$res->vigente == 1) {
 
  $_SESSION['idUsuario2']= 10;
 }

method 2:
...
public function 
cambiaClave_get()
 
   var_dump($_SESSION['idUsuario2']."aaaa");
 
    exit



...
Reply
#2

You used $_SESSION is PHP native session

Using CI session via $this->session->function_name(), check docs here

http://www.codeigniter.com/user_guide/li...sions.html
Reply
#3

(10-23-2016, 07:23 PM)d4jk4 Wrote: You used $_SESSION is PHP native session

Using CI session via $this->session->function_name(), check docs here

http://www.codeigniter.com/user_guide/li...sions.html

CI3 hooks into PHP's native sessions, that's not an issue at all.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB