Welcome Guest, Not a member yet? Register   Sign In
Problem with Session PHP 5.5 and 5.6 (localhost)
#1
Bug 

Hi All,

 The session aren't working in Debian/Ubuntu with PHP 5.5 and 5.6.

 I tested using database and files drivers. 

 Every time that the page was loaded a new session is created although reusing. 

 I tested with localhost and IP adresses with the same error.

 Here are my config:

PHP Code:
$config['sess_driver'] = 'files';
//$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'cisessionsira';
$config['sess_expiration'] = 0;// default 7200
//$config['sess_save_path'] = 'ci_sessions'; //database
$config['sess_save_path'] = '/tmp/'// files

$config['sess_match_ip'] = FALSE;
//$config['sess_match_ip'] = TRUE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;


$config['cookie_prefix']    = '';
$config['cookie_domain']    = 'teste.icmc';
$config['cookie_path']        = '/tmp/';
$config['cookie_secure']    = FALSE;
$config['cookie_httponly']     = FALSE
Reply
#2

Are you really running your website on teste.icmc/tmp/ ?
Reply
#3

(06-15-2016, 08:17 AM)Narf Wrote: Are you really running your website on teste.icmc/tmp/ ?

 No.

 It's in localhost.

 Changing the values to '' the problem remains.

 In this development enviroment I have a CI 2 running without problem.

 Thanks,
Reply
#4

I Solve the problem Downgrading the CI to 3.0.3 !!!!

I was using 3.0.6 !

When I have time I'll investigate the problem to solve in the new version.
Reply
#5

... downgrading is not a solution. And neither is putting in made-up values, please read the documentation.
Reply
#6

Hi Narf,

I do not agree in Downgrading. But spend 14 hours to debugging why Session isn't work is too much!

I Use and Read a lot the CI Docs, and there are no answer to my problem! So I try another solution!

So, when the client was testing the system with 3.0.3 I will upgrading to 3.0.6 and discover where is the BUG!
Reply
#7

(06-16-2016, 03:48 AM)igorvc Wrote: Hi Narf,

I do not agree in Downgrading. But spend 14 hours to debugging why Session isn't work is too much!

I Use and Read a lot the CI Docs, and there are no answer to my problem! So I try another solution!

So, when the client was testing the system with 3.0.3 I will upgrading to 3.0.6 and discover where is the BUG!

There is no such bug; this is 100% misconfiguration, hence why I told you to read the docs.
The answer IS in there, but you need to understand it and judging by what you've shown so far - you don't.

If you did, you wouldn't be setting the cookie_domain to 'teste.inc' for an app running on localhost, nor the cookie_path to '/tmp/' - that's an URL path, not where your sessions are stored.

Screaming "BUG" won't help you. Provide more technical information and we may be able to help.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB