cookies - Slim setCookies not working -


i try $app->setcookies() , $app->getcookies() work.

so heres $app config:

$app = new \slim\slim(array(     'view' => new \slim\views\twig(),     'debug' => true,     'cookies.encrypt' => false,              // <= no encrypt bug     'cookies.secret_key' => '6yxwi8fg4tr72', // <= random digits     'cookies.cipher' => mcrypt_rijndael_256,     'cookies.cipher_mode' => mcrypt_mode_cbc )); 

the middleware added injecting variables. [no sessionmiddleware]

$app->get('/login',function () use ($app) {     $app->setcookie('admin', true);     $app->redirectto('home'); }); 

according answer on: why won't asp.net create cookies in localhost? edited /etc/hosts file.

however no matter do, whenever $app->setcookies() called, retrieve blank page. if comment out, redirected homepage. no errors thrown well.

i looked composer.json settings , found dependency on doctrine/cache seemed interfere.

{     "require": {         "php": ">=5.4",         "ext-mcrypt": "*",         "pimple/pimple": "3.*",         "slim/slim": "~2.0",         "slim/views": "0.1.*",         "twig/twig": "1.18.*",         "propel/propel": "~2.0@dev"     },      "autoload": {         "classmap": ["website/", "generated-conf/"]     } } 

now these settings cookies working fine.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -