CodeIgniter 3 Session: File Driver
My first production web application was built using codeigniter. At that time Elislab maintained the codeigniter.Now it is maintained by British Columbia Institute of Technology and they have released the version 3.Recently I started to do a project from new version (3.0.1). I like the new documentation.
New configurations are introduced in this new version. According to user guide Session library is rewritten. Now session driver supports:
- files
- database
- redis
- memcached
So I moved easy but slower driver: files. But it was not that easy. This was my configuration in beginning.
1 | $config['sess_driver'] = 'files'; |
This gives me a error
1 | A PHP Error was encountered |
So I changed the 'sess_save_path'
to APPPATH.'session/'
. Since Documentation says ‘WARNING: Only absolute paths are supported!’
1 | $config['sess_driver'] = 'files'; |
FYI : When i writing this blog 'sess_save_path'
to '/application/session/'
this also worked. But I suggest to use APPPATH since it asks for absolute path.