How to configure Session with Files |
Hello,
I try to use session_data with PHP Code: $config['sess_driver'] = 'files';// and " touch(): Unable to create file cache_session\ci_session2f5e78f45e32a3fc8dadee822e0b8d68719d7e2a : failed to open stream: No such file or directory" Error line number 234 in Sesssion_files_driver.php At the first call of my controller named "Defaut", no problem for writing file for session and his name is (for example) : ci_session2f5e78f45e32a3fc8dadee822e0b8d68719d7e2a. After, when i call my function (index) of the controller named "Debut" the view is loaded but an error appears. I'm using session by database and all is all right and i wanted to try with files. Can you help me please ? I do make a mistake somewhere My Controller PHP Code: // i set my variable session in this controller for example. In the view associated, i can use the session variable. If i reload the page error appears PHP Code: class Debut extends CI_Controller PHP Code: <?php echo 'value of var session :'.$this->session_userdata('essai') ; ?> Thanks for your help. (04-08-2015, 11:16 PM)casa Wrote: Hello,Hello, I had the exact problem, try to load the url helper before you use the session library, this seems to help. PHP Code: $this->load->helper('url');
The comments in the config file include the solution to your problem:
PHP Code: /* Use an absolute path, not a relative path. In Linux, most absolute paths will start with / (in Windows, with a drive letter, like C:\). The easiest way to get an absolute path is to use something like APPPATH, BASEPATH, or FCPATH as the base of your path, or use PHP's realpath().
@Offline mwhitney
Thanks a lot.. i had the config.php files of CI3.0 RC and this comments doesn't exists "WARNING: Only absolute paths are supported!". That solve my problems ![]() Have a good day. (09-11-2015, 07:15 AM)mwhitney Wrote: The comments in the config file include the solution to your problem: |
Welcome Guest, Not a member yet? Register Sign In |