Hello Community,
This is my 3rd day using Phalcon.
My Phalcon version is: 3.3.1
I have the following from https://docs.phalcon.io/fr/3.3/session
//in public\index.php
use Phalcon\Session\Adapter\Files as Session;
//I also tried $di->setShared - same error
$di->set('session', function () { $session = new Session(); $session->start(); return $session; } );
//in Controller
$this->session->set('user-name', 'xyz');
if ($this->session->has('user-name')) { // Retrieve its value $name = $this->session->get('user-name'); echo $name; }
I get the output: Exception: Invalid superglobal
How can I get around this?