CodeIgniter Forums

Full Version: empty session path
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, I've looked a while here, googled but found no hint.

My site https://www.MYDOMAIN uses sessions without problem, the session path is empty, however.
For testing i use version.MYDOMAIN and sessions are lost. here the session path is empty as well.

sess_cache folder has '777'

My config file is

$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = FCPATH . 'sess_cache';

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

$config['cookie_prefix'] = '';
$config['cookie_domain'] = '';
$config['cookie_path'] = '/';
$config['cookie_secure'] = FALSE;
$config['cookie_httponly'] = FALSE;

What might be wrong with my setup?
I haven't had enough coffee today so I'm not sure what you mean by "the session path is empty,"

Does that mean that $config['sess_save_path'] = ''; or that FCPATH/sess_cache/ has no files in it?

Either way try
PHP Code:
$config['cookie_domain'] = '.MYDOMAIN'
thanks dave, my question was unclear. sure.
there are no files in the directory FCPATH/sess_cache/ , but PHPSESSID are mentioned in the Application storage of the developer tools.
therefore, I assume that native php sessions are being used.
latest CI, php 7
Hi dave, my question was unclear. the folder FCPATH . 'sess_cache'; is empty, changing the $config['cookie_domain'] didn't help, thank you anyway.

in the application storage of the developer tool, PHPSESSIONS are being shown. so I think, that native php sessions are used.

I did not change anything so I'm very confused what I might do wrong.
Latest CI 3.1.4, php 7
CI 3.1.4 is not "latest", it's 3 releases behind.

But your issue might be the session.auto_start INI setting.
You're right: 3.1.7 is my version.
anyway, I've modified the $config['sess_cookie_name'] = 'sess';
More specific, without the underscore as before "ci_session"

and my "sess_save_path" starts to fill with data.

thank you guys, if that was coincidence or causality: ?

both servers "https://www.MYDOMAIN" and "version.MYDOMAIN" are working - at least they seem to as I've got data in the session folder and sessions work fine.

cheers and a big thanks