I'm using Concrete5 from an external script. (The endgoal is external authentication in another system). So I implemented it as mentioned here: Bootstrapping C5 from an external script
It works fine, I can access all of the classes. However, when using the Session class, the variables aren't stored for longer than one execution. So when running the following script, the output 'succes!' is never shown.
define('C5_ENVIRONMENT_ONLY', true);
define('REDIRECT_TO_BASE_URL', false);
require('index.php');
if(!Session::get('uID')) {
echo ("Better luck next time...");
Session::set('uID', 1);
echo ("Var set: ".Session::get('uID'));
} else {
echo("succes!");
}
Does anybody know what has to change to make this work?