CodeIgniter Forums
I have a problem in godaddy hosting with session library - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: I have a problem in godaddy hosting with session library (/showthread.php?tid=65884)



I have a problem in godaddy hosting with session library - mostadev - 08-05-2016

note: (windows is the hosting platform)

when i load session library like this
/application/autoload.php line 61 , codeigniter 3


PHP Code:
$autoload['libraries'] = array('database','form_validation','session'); 

this errors appears

An uncaught Exception was encountered

Type: Exception
Message: Session: Configured save path 'C:\Windows\Temp' is not writable by the PHP process.
Filename: G:\PleskVhosts\andalusiaportal.com\tickets\system\libraries\Session\drivers\Session_files_driver.php
Line Number: 124
Backtrace:
File: G:\PleskVhosts\andalusiaportal.com\tickets\application\controllers\users.php
Line: 6
Function: __construct
File: G:\PleskVhosts\andalusiaportal.com\tickets\index.php
Line: 316
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: file_exists(): open_basedir restriction in effect. File(188c65c2f550c90e7260c51ad34677d10e11266b) is not within the allowed path(s): (G:/PleskVhosts//andalusiaportal.com\;C:\Windows\Temp\)
Filename: drivers/Session_files_driver.php
Line Number: 154
Backtrace:
A PHP Error was encountered
Severity: Warning
Message: fopen(): open_basedir restriction in effect. File(188c65c2f550c90e7260c51ad34677d10e11266b) is not within the allowed path(s): (G:/PleskVhosts//andalusiaportal.com\;C:\Windows\Temp\)
Filename: drivers/Session_files_driver.php
Line Number: 156
Backtrace:
A PHP Error was encountered
Severity: Warning
Message: fopen(188c65c2f550c90e7260c51ad34677d10e11266b): failed to open stream: Operation not permitted
Filename: drivers/Session_files_driver.php
Line Number: 156
Backtrace:
A PHP Error was encountered
Severity: Warning
Message: Unknown: Failed to write session data (user). Please verify that the current setting of session.save_path is correct (C:\Windows\Temp)
Filename: Unknown
Line Number: 0
Backtrace:

the configuration of session library in config.php
PHP Code:
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE



it's urgent please


RE: I have a problem in godaddy hosting with session library - waptik - 08-06-2016

try to contact host about it. it's just a problem of permission for files/folders. path 'C:\Windows\Temp' is not writable by the PHP process means permission is forbidden by server for codeigniter(this file:G:\PleskVhosts\andalusiaportal.com\tickets\system\libraries\Session\drivers\Session_files_driver.php) to save sessions in temp folder. if you can't do that youself,then kindly ask Godaddy(your host) to fix that for you. i know nothing about window server and its confiuration.


RE: I have a problem in godaddy hosting with session library - Avenirer - 08-07-2016

$config['sess_save_path'] = NULL;

This should not be NULL. It should be a path to a directory. Why not give the manual a try: https://codeigniter.com/user_guide/libraries/sessions.html#files-driver