Link to home
Start Free TrialLog in
Avatar of tf2012
tf2012

asked on

php session folder question (Code Igniter)

So I'm using the code igniter session library to manage user sessions and in the config file I've choosen to use the file method of managing sessions.  Now I need to create a folder (sess_save_path) where these temp session files will be stored with permissions of 700.  No problem I can do that but I have no idea what to call the folder.  What is normal convention in these cases.  Also, if I wasn't using code igniter to manage this, which folder would be used by default in PHP?

Here is the default entry in the Code Igniter config file:
/*
|--------------------------------------------------------------------------
| Session Variables
|--------------------------------------------------------------------------
|
| 'sess_driver'
|
|      The storage driver to use: files, database, redis, memcached
|
| 'sess_cookie_name'
|
|      The session cookie name, must contain only [0-9a-z_-] characters
|
| 'sess_expiration'
|
|      The number of SECONDS you want the session to last.
|      Setting to 0 (zero) means expire when the browser is closed.
|
| 'sess_save_path'
|
|      The location to save sessions to, driver dependent.
|
|      For the 'files' driver, it's a path to a writable directory.
|      WARNING: Only absolute paths are supported!
|
|      For the 'database' driver, it's a table name.
|      Please read up the manual for the format with other session drivers.
|
|      IMPORTANT: You are REQUIRED to set a valid save path!
|
| 'sess_match_ip'
|
|      Whether to match the user's IP address when reading the session data.
|
|      WARNING: If you're using the database driver, don't forget to update
|               your session table's PRIMARY KEY when changing this setting.
|
| 'sess_time_to_update'
|
|      How many seconds between CI regenerating the session ID.
|
| 'sess_regenerate_destroy'
|
|      Whether to destroy session data associated with the old session ID
|      when auto-regenerating the session ID. When set to FALSE, the data
|      will be later deleted by the garbage collector.
|
| Other session cookie settings are shared with the rest of the application,
| except for 'cookie_prefix' and 'cookie_httponly', which are ignored here.
|
*/
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'hello_world';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = "/var/www/vhosts/sunshine/rain/application/temp"; // this my first crack at it, works but not sure if the folder location is appropriate... help
$config['sess_match_ip'] = TRUE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
ASKER CERTIFIED SOLUTION
Avatar of Marco Gasi
Marco Gasi
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tf2012
tf2012

ASKER

@Marco.... I was using that page already but didn't see those important details at the bottom. Thanks!
Lol. Glad to help you. Often details have this style:

.details{
    content: !important;
    display: none;
}

Open in new window

;)