• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with session files

#1
Hello everybody,

we develop with CI from many years but we have a weird thing that happen with our last project.

We use CI 3.1.3 on virtualized server with VMware. The "sess_driver" parameter is set to "files".

Sometimes we get this error: 

Severity: Warning --> filesize(): stat failed for /webroot/temp/webcrm/evolutionweb_ikbbigqenm63k241vhle4nhh96oshui9 /webroot/engine/system/libraries/Session/drivers/Session_files_driver.php 208

This file is not updated in the latest CI versions.

Looking at the code we think it's something going wrong between row 170 (where file presence is checked) and row 208 (where file is read).

Now we are tring to switch to "tmpfs" to have more fast access to filesystem. No idea if this can fix it.

Any other suggestion or fixes?
Reply

#2
How big is the file?
Reply

#3
That path does not look like the complete path. The session file path must be complete and absolute - like from the /root/to/the/eventual/folder/for/session_files/

I'm guessing yours should look more like /var/www/webroot/temp/webcrm/

What's assigned to $config['sess_save_path'] ?
Reply

#4
(11-22-2017, 01:17 PM)PaulD Wrote: How big is the file?

Hello PaulD,

I don't know what it's the size of the "problemating" file because it was no longer present.


Checking on production server the biggest file is 30825 bytes.

There are many other files of 20-25 KB.

Do you think it depends on that?
Reply

#5
(11-22-2017, 10:01 PM)dave friend Wrote: That path does not look like the complete path. The session file path must be complete and absolute - like from the /root/to/the/eventual/folder/for/session_files/

I'm guessing yours should look more like /var/www/webroot/temp/webcrm/

What's assigned to $config['sess_save_path'] ?

Hello dave,


thank you for your reply. The path are correct and already absloute. 

These are our settings:

  $config['sess_driver'] = 'files';
  $config['sess_cookie_name'] = 'crm_';
  $config['sess_expiration'] = 0;
  $config['sess_save_path'] = '/webroot/temp/webcrm/';
  $config['sess_match_ip'] = FALSE;
  $config['sess_time_to_update'] = 60 * 30;
  $config['sess_regenerate_destroy'] = FALSE;
Reply

#6
Hi All,

May I know if you already know how to fix this issue?

Thanks
Reply

#7
I create a folder under the application folder called writable.

./application/writable

then set the sessions up like below works fine for me.

PHP Code:
$config['sess_driver'             'files';
$config['sess_cookie_name'        'pcfx_session_'// change pcfx to you name
$config['sess_expiration'         7200;
$config['sess_save_path'          APPPATH.'writable'// create a folder under ./application/writable
$config['sess_match_ip'           FALSE;
$config['sess_time_to_update'     300;
$config['sess_regenerate_destroy' FALSE
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#8
(11-23-2017, 02:09 AM)raffaele.bennoli Wrote: thank you for your reply. The path are correct and already absloute. 

These are our settings:

  $config['sess_driver'] = 'files';
  $config['sess_cookie_name'] = 'crm_';
  $config['sess_expiration'] = 0;
  $config['sess_save_path'] = '/webroot/temp/webcrm/';
  $config['sess_match_ip'] = FALSE;
  $config['sess_time_to_update'] = 60 * 30;
  $config['sess_regenerate_destroy'] = FALSE;

I may be wrong because I have no knowledge of your file structure, but 'sess_save_path' does not look complete to me. It has to be the complete path from the root of the drive. In a typical Linux setup it would look more like this.

PHP Code:
$config['sess_save_path'] = '/var/www/webroot/temp/webcrm/'
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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