Codeigniter Session: Configured save path is not a directory

Codeigniter 3.x

Message: Session: Configured save path '' is not a directory, doesn't exist or cannot be created.

Profiles config.phpin

$config['sess_save_path'] = NULL;

It can be modified to

$config['sess_save_path'] = APPPATH.'sessions';

Then applicationcreate a directory folder sessionsdirectory

[vagrant@centos application]# chmod 755 sessions

If the directory is on a similar /home/waka/public_htmldirectory and appear similar to the following circumstances

Configured save path `/home/waka/public_html/application/sessions` is not writable by the PHP process

You need to give sessionlinux system user the owner of the folder for this folder belongs

Can groupsview the user group the user belongs command

[vagrant@centos application]# groups waka
waka: waka
[vagrant@centos application]# chown waka:waka sessions
References
  1. Codeigniter cannot load libraries
  2. Linux view the user group

Guess you like

Origin www.cnblogs.com/fsong/p/11419961.html