• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
session_start() error

#1
Hi,

Huh

I want initialize a session library in controller follow the instructions of the manual

$session = \Config\Services:Confusedession($config);

but, I get a error

SYSTEMPATH/Session/Session.php at line 1001
Reply

#2
i resolve with .env file:

app.sessionSavePath = 'session'
Reply

#3
Here is the documentation for CI3:
https://codeigniter.com/userguide3/libra...sions.html
And this for CI4:
https://codeigniter4.github.io/userguide...sions.html
Do exactly as it is described and you will succeed !
And could not would you straight for the himself code where you're trying connect to sessions and logs mistakes from directory /writable/logs/
this is necessary so that we can give a more accurate answer to your question !
I would change this world, but God doesn't give me the source.
Reply

#4
(10-02-2019, 05:05 AM)Digital_Wolf Wrote: Here is the documentation for CI3:
https://codeigniter.com/userguide3/libra...sions.html
And this for CI4:
https://codeigniter4.github.io/userguide...sions.html
Do exactly as it is described and you will succeed !
And could not would you straight for the himself code where you're trying connect to sessions and logs mistakes from directory /writable/logs/
this is necessary so that we can give a more accurate answer to your question !

Ok,

I start a new CI4 project and uncomment last line (// $this->session = \Config\Services:Confusedession()Wink and I get the error.

I solved it with .env file: app.sessionSavePath = 'session'

thank's.
Reply

#5
Yes, most of the session drivers require sessionSavePath to be set. This can be done in app/Config/App.php itself, or through the .env file like you've seen.
Support Development  • Practical CodeIgniter 3  • Vulcan - CLI Tools for CI4
Reply

#6
Hi,

I solve the load library, but when I try to set a session with ($this->session-set('', '')Wink I get a new error
Invalid serialization data for DateTime object#0 [internal function]: DateTime->__wakeup().

Some idea? it's possible to the problem are in the apache config for php 7.3?

thank's
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.