Welcome Guest, Not a member yet? Register   Sign In
Setting sess_save_path correctly
#2

(This post was last modified: 03-05-2016, 12:43 PM by iz_no_good.)

i remember i had similar problem with my app when uploaded to the hosting server. i guess the problem comes from the caged virtual FS that you see on the hosting server, while you see path /htdocs/session_path , the real path is, for example: /var/<username>/htdocs/session_path.

what i finally did to overcome this, is:

the prod installation has in index.php:

define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'production');

while the installation on my dev PC has:

define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development');

so, remove completely the line about sess_path line from the application/config.php file and define the path (use absolute path, i could see the absolute path in the log, i dont see it in your case, you will have to discover it somehow, maybe even ask the server admin) on each file (config/production/config.php and config/development/config.php), and by changing the ENVIRONMENT in the index.php, you can make CI load the path you need per system. before all that, i had relevant path (../xxx/xxx/session_path for example), but when i migrated to the hosting server, i ended up in the above trouble and had to switch to absolute paths.

hope it helps
Reply


Messages In This Thread
Setting sess_save_path correctly - by n2fole00 - 03-05-2016, 08:45 AM
RE: Setting sess_save_path correctly - by iz_no_good - 03-05-2016, 12:37 PM
RE: Setting sess_save_path correctly - by Narf - 03-05-2016, 12:59 PM
RE: Setting sess_save_path correctly - by MikeDiz - 05-30-2018, 01:18 AM
RE: Setting sess_save_path correctly - by MikeDiz - 05-30-2018, 01:20 AM
RE: Setting sess_save_path correctly - by MikeDiz - 05-30-2018, 03:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB