• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The session to files do not appear in sessions folder

#1
Hello,

The session to files do not appear in ../sessions folder.
/sessions folder with cmod 0777
Any suggestion?

Using database that works.

$config['sess_driver'] = 'files';
//$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'of';
$config['sess_expiration'] = 0;
$config['sess_save_path'] = FCPATH.'application/sessions';
//$config['sess_save_path'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;

Thanks.
Reply

#2
Try on you save path end with  /


PHP Code:
 $config['sess_save_path'] = APPPATH 'sessions/'



0700 for chmod best I think

Also how do you load sessions $this->load->library('session'); or on autoload.php

$autoload['libraries'] = array('session');
There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply

#3
Not worked yet. Sad

I'm using CentOS 7.2 and PHP7. Maybe I have to do something in php.ini?
Reply

#4
I don't know where "../sessions" is ... you configured your session folder to be "application/sessions" inside your document root.
Reply

#5
It's at folder application/sessions (chmod 0700)

None of them work:

$config['sess_save_path'] = FCPATH.'application/sessions';
or
$config['sess_save_path'] = APPPATH . 'sessions/';

He is pointing to the correct place. Maybe the problem is another.
Reply

#6
Look at your log files.
Reply

#7
Do not show any errors. Only that:

INFO - 2016-10-18 21:08:41 --> Session: Class initialized using 'files' driver.
DEBUG - 2016-10-18 21:08:41 --> Session class already loaded. Second attempt ignored.
INFO - 2016-10-18 21:08:41 --> Helper loaded: cookie_helper
Reply

#8
This works for me CI 3.1.0 PHP 7 with my session folder called ../application/temp

PHP Code:
$config['sess_driver'             'files';
$config['sess_cookie_name'        'fxsession';
$config['sess_expiration'         7200;
$config['sess_save_path'          APPPATH.'temp';
$config['sess_match_ip'           FALSE;
$config['sess_time_to_update'     300;
$config['sess_regenerate_destroy' FALSE

Change the set_cookie_name to your own name.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#9
It does not work.

$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'of';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = APPPATH.'sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;

Please sorry. Sad
I'm using PHP 7.1 RC4
The problem in PHP, is it?
Reply

#10
Then you must have an installation problem with your folders access.

But I do know that they made changes to the PHP 7 sessions.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.