php - Symfony2 interacting with existing session -


i trying read , write session started php's native session. have found information cannot interact session. used 2 documents:

http://symfony.com/doc/current/components/http_foundation/session_php_bridge.html

http://symfony.com/doc/current/cookbook/session/php_bridge.html

if understand well, should able attributes of session once phpbridgesessionstorage has been started? if so, empty array.

here how coded it:

public function indexaction(request $request)     {    //i service, execute , session created.       $phpcas = $this->container->get('phpcas');       $phpcas->execute();  // start new session , display what's inside       $session = new session();       $session->start();       $array = $session->all();       echo "<pre>";       print_r($array);       echo "</pre>";       return; 

in service start php bridge session this:

    public function execute()         {             require_once __dir__ . '/source/config.php';              ini_set('session.save_handler', 'files');             ini_set('session.save_path', '/tmp');             session_start();              phpcas::setdebug();             phpcas::client(saml_version_1_1, $cas_host, $cas_port, $cas_context);             phpcas::setcasservercacert($cas_server_ca_cert_path);             phpcas::handlelogoutrequests(true, $cas_real_hosts);  //in forceauthentication(), going  start again session , create cookie.          phpcas::forceauthentication();      //i start new phpbridgesessionstorage interact session                 $session = new session(new phpbridgesessionstorage());                 $session->start();             } 

in app/config.yml have written this:

session:          storage_id: session.storage.php_bridge         handler_id: ~         save_path: null 

i using linux, problem of permission read/write /tmp? or me don't understand documentation , didn't write code correctly make interacting?

thank help


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -