session_start() error |
Hi,
I want initialize a session library in controller follow the instructions of the manual $session = \Config\Services:ession($config); but, I get a error SYSTEMPATH/Session/Session.php at line 1001
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.
(10-02-2019, 05:05 AM)Digital_Wolf Wrote: Here is the documentation for CI3: Ok, I start a new CI4 project and uncomment last line (// $this->session = \Config\Services:ession() and I get the error. I solved it with .env file: app.sessionSavePath = 'session' thank's.
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.
Hi,
I solve the load library, but when I try to set a session with ($this->session-set('', '') 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
This might be perceived as a dig, sorry for that but I ran into exactly the same issue.
This time with PHP 7.2.1. I've read on some dev site there was a PHP bug causing this around version 5.3 or so. Is it possible the PHP itself is at fault? |
Welcome Guest, Not a member yet? Register Sign In |